[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. b15cac11c9a1b518cbd2b6a24278b9e8f2ecd4d9

Evergreen Git git at git.evergreen-ils.org
Thu Mar 28 15:39:06 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, rel_2_2 has been updated
       via  b15cac11c9a1b518cbd2b6a24278b9e8f2ecd4d9 (commit)
       via  504fd3a3501066425819e1c2938c7a876b8b68ac (commit)
      from  e393a1ba7aca84988a4e61c65d34a0738749bbd7 (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 b15cac11c9a1b518cbd2b6a24278b9e8f2ecd4d9
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 c09896c..cb45fd3 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3166,14 +3166,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 504fd3a3501066425819e1c2938c7a876b8b68ac
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 39a81b3..c09896c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3164,16 +3164,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