[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. cee7bab642ba1ff99110d933387fa33701d23d3f

Evergreen Git git at git.evergreen-ils.org
Thu Mar 28 15:18:26 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_3 has been updated
       via  cee7bab642ba1ff99110d933387fa33701d23d3f (commit)
       via  3116f06be0cdf05cd3073e9ac56dac69eecaa3ef (commit)
      from  0552b0aca01c60e50b8ccc0528f793dc383d1fd2 (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 cee7bab642ba1ff99110d933387fa33701d23d3f
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 23bf373..afd61d5 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3236,14 +3236,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 3116f06be0cdf05cd3073e9ac56dac69eecaa3ef
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 8b20659..23bf373 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3234,16 +3234,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