[open-ils-commits] [GIT] Evergreen ILS branch master updated. 0c29090151e896568214eef2ed2ae69b49c16974

Evergreen Git git at git.evergreen-ils.org
Mon Oct 31 16:57:57 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  0c29090151e896568214eef2ed2ae69b49c16974 (commit)
       via  f4c3e205857cc2a23f847f69b07385b8c27938f0 (commit)
      from  b2958a8bb6145c5aa2eee8aa0b7b6a306732785a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0c29090151e896568214eef2ed2ae69b49c16974
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Oct 31 16:56:55 2011 -0400

    Trivial whitespace touchup to Cronscript.pm.in
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/Cronscript.pm.in b/Open-ILS/src/perlmods/lib/OpenILS/Utils/Cronscript.pm.in
index cb0c860..4c0d66b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/Cronscript.pm.in
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/Cronscript.pm.in
@@ -300,13 +300,18 @@ sub authenticate {
     my $self = shift or return;
     my $args = shift or return;
     if ($args && ref($args) eq 'HASH') {
-        $self->{bootstrapped}  or $self->bootstrap();
+        $self->{bootstrapped} or $self->bootstrap();
+
         my $session = Opensrf::AppSession->create('open-ils.auth');
-        my $seed = $session->request('open-ils.auth.authenticate.init',
-                                    $args->{'username'})->gather(1);
+        my $seed = $session->request(
+            'open-ils.auth.authenticate.init', $args->{'username'}
+        )->gather(1);
+
         $args->{password} = md5_hex($seed . md5_hex($args->{password}));
-        my $req = $session->request('open-ils.auth.authenticate.complete',
-                                    $args);
+        my $req = $session->request(
+            'open-ils.auth.authenticate.complete', $args
+        );
+
         my $response = $req->gather(1);
         if ($response && ref($response) eq 'HASH' && $response->{payload}) {
             $self->{authtoken} = $response->{payload}->{authtoken};

commit f4c3e205857cc2a23f847f69b07385b8c27938f0
Author: Jason Stephenson <jstephenson at mvlc.org>
Date:   Mon Oct 31 16:36:27 2011 -0400

    OpenILS::Utils::Cronscript can have only 1 session.
    
    Work around the above limitation by using OpenSRF::AppSession
    to create a session for open-ils.auth in the authenticate method.
    
    Also requires us to manually check if we're bootstrapped, since
    we can't rely on OpenILS::Utils::Cronscript->session to do it for
    us.
    
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/Cronscript.pm.in b/Open-ILS/src/perlmods/lib/OpenILS/Utils/Cronscript.pm.in
index 9e5e8e5..cb0c860 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/Cronscript.pm.in
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/Cronscript.pm.in
@@ -300,7 +300,8 @@ sub authenticate {
     my $self = shift or return;
     my $args = shift or return;
     if ($args && ref($args) eq 'HASH') {
-        my $session = $self->session('open-ils.auth');
+        $self->{bootstrapped}  or $self->bootstrap();
+        my $session = Opensrf::AppSession->create('open-ils.auth');
         my $seed = $session->request('open-ils.auth.authenticate.init',
                                     $args->{'username'})->gather(1);
         $args->{password} = md5_hex($seed . md5_hex($args->{password}));

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Utils/Cronscript.pm.in    |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list