From 1e8971b4c4cdbe395c5409064f1198a887dfe99d Mon Sep 17 00:00:00 2001 From: Dan Wells Date: Fri, 15 Mar 2013 14:42:24 -0400 Subject: [PATCH] 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 Signed-off-by: Kyle Tomita --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 1d32a03d0b..513507280c 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} ] ); } } -- 2.11.0