From: phasefx Date: Thu, 11 Feb 2010 20:18:47 +0000 (+0000) Subject: Use the home library of the bucket owner as the context org for the VIEW_CONTAINER... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0ef64b21e27b8d8d600fa08378112f5794d2c1db;p=working%2FEvergreen.git Use the home library of the bucket owner as the context org for the VIEW_CONTAINER permission git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@15506 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm index c2eda9e0b6..67f91a04b1 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm @@ -97,7 +97,9 @@ sub _bucket_flesh { unless($U->is_true($bkt->pub)) { return undef if $self->api_name =~ /public/; unless($bkt->owner eq $e->requestor->id) { - return $e->event unless $e->allowed('VIEW_CONTAINER', $bkt); + my $owner = $e->retrieve_actor_user($bkt->owner) + or return $e->die_event; + return $e->event unless $e->allowed('VIEW_CONTAINER', $owner->home_ou); } }