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

Evergreen Git git at git.evergreen-ils.org
Thu Mar 28 15:13:57 EDT 2013


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  6dd7420c16074cac024d03dfd0f28fa2ba3a58de (commit)
       via  1e8971b4c4cdbe395c5409064f1198a887dfe99d (commit)
      from  d198705a3fe393a094cc626f428acd8ec096657f (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 6dd7420c16074cac024d03dfd0f28fa2ba3a58de
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Fri Mar 15 14:47:53 2013 -0400

    Allow access to public hold notes via hold "blob"
    
    If a hold note is marked as "public", it seems reasonable that it
    should be visible to anyone who can see that hold, regardless of
    who created the note.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Kyle Tomita <ktomita at catalystitservices.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
index 5135072..8e7e5f7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3254,14 +3254,14 @@ sub uber_hold_impl {
     if($hold->usr->id ne $e->requestor->id) {
         # caller is asking for someone else's hold
         $e->allowed('VIEW_HOLD') or return $e->event;
-        $hold->notes( # filter out any non-staff ("private") notes
-            [ grep { $U->is_true($_->staff) } @{$hold->notes} ] );
+        $hold->notes( # filter out any non-staff ("private") notes (unless marked as public)
+            [ grep { $U->is_true($_->staff) or $U->is_true($_->pub) } @{$hold->notes} ] );
 
     } else {
         # caller is asking for own hold, but may not have permission to view staff notes
         unless($e->allowed('VIEW_HOLD')) {
-            $hold->notes( # filter out any staff notes
-                [ grep { !$U->is_true($_->staff) } @{$hold->notes} ] );
+            $hold->notes( # filter out any staff notes (unless marked as public)
+                [ grep { !$U->is_true($_->staff) or $U->is_true($_->pub) } @{$hold->notes} ] );
         }
     }
 

commit 1e8971b4c4cdbe395c5409064f1198a887dfe99d
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Fri Mar 15 14:42:24 2013 -0400

    Fix reversed logic for hold "blob" notes
    
    Hold notes (at least at the data level) allow for both staff and
    "private" notes to be attached. This code intended to show "private"
    notes to the hold owner and staff notes to staff, but had the logic
    reversed.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Kyle Tomita <ktomita at catalystitservices.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
index 1d32a03..5135072 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3252,16 +3252,16 @@ sub uber_hold_impl {
     ) or return $e->event;
 
     if($hold->usr->id ne $e->requestor->id) {
-        # A user is allowed to see his/her own holds
+        # caller is asking for someone else's hold
         $e->allowed('VIEW_HOLD') or return $e->event;
         $hold->notes( # filter out any non-staff ("private") notes
-            [ grep { !$U->is_true($_->staff) } @{$hold->notes} ] );
+            [ grep { $U->is_true($_->staff) } @{$hold->notes} ] );
 
     } else {
         # caller is asking for own hold, but may not have permission to view staff notes
         unless($e->allowed('VIEW_HOLD')) {
             $hold->notes( # filter out any staff notes
-                [ grep { $U->is_true($_->staff) } @{$hold->notes} ] );
+                [ grep { !$U->is_true($_->staff) } @{$hold->notes} ] );
         }
     }
 

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

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Circ/Holds.pm |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list