From: Kyle Tomita Date: Tue, 26 Mar 2013 19:57:46 +0000 (-0700) Subject: LP1109316 - Hold note count and text not displayed X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f228eabaa469bb91023e8e0b5e708793ae5a2be1;p=working%2FEvergreen.git LP1109316 - Hold note count and text not displayed Ported over dwells' solution for fixing the holds blob. Signed-off-by: Kyle Tomita --- 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 39a81b30e3..82bc453b28 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} ] ); + $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} ] ); } }