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} ] );
}
}