From 6dd7420c16074cac024d03dfd0f28fa2ba3a58de Mon Sep 17 00:00:00 2001 From: Dan Wells Date: Fri, 15 Mar 2013 14:47:53 -0400 Subject: [PATCH 1/1] 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 Signed-off-by: Kyle Tomita --- .../src/perlmods/lib/OpenILS/Application/Circ/Holds.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 513507280c..8e7e5f7f04 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} ] ); } } -- 2.43.2