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

Evergreen Git git at git.evergreen-ils.org
Tue Oct 11 17:28:54 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  ff2f86b94f445a87d1b7c937e275d9e454b735c5 (commit)
      from  9ef0d32e369c0501746dd0cc3edfb81a7cecff43 (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 ff2f86b94f445a87d1b7c937e275d9e454b735c5
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Tue Oct 11 16:55:12 2011 -0400

    TPac: Use workstation to determine staff
    
    Instead of user agent, which may be set easily by anyone, use the presence
    of a workstation ID to determine "staff" use of the TPac.
    
    This is much less likely to be spoofed or incorrect due to things like
    previous use of the extension version of the client in Firefox.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 4137472..122f08c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -219,7 +219,7 @@ sub load_common {
     $ctx->{full_path} = $ctx->{base_path} . $self->cgi->path_info;
     $ctx->{unparsed_uri} = $self->apache->unparsed_uri;
     $ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
-    $ctx->{is_staff} = ($self->apache->headers_in->get('User-Agent') =~ /oils_xulrunner/);
+    $ctx->{is_staff} = 0; # Assume false, check for workstation id later.  Was: ($self->apache->headers_in->get('User-Agent') =~ /oils_xulrunner/);
     $ctx->{orig_loc} = $self->get_orig_loc;
 
     # capture some commonly accessed pages
@@ -238,6 +238,7 @@ sub load_common {
                 'open-ils.actor', 
                 'open-ils.actor.user.opac.vital_stats', 
                 $e->authtoken, $e->requestor->id);
+            $ctx->{is_staff} = 1 if $e->requestor->wsid;
 
         } else {
 

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

Summary of changes:
 .../src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm    |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list