Use the home library of the bucket owner as the context org for the VIEW_CONTAINER...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 11 Feb 2010 20:19:18 +0000 (20:19 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 11 Feb 2010 20:19:18 +0000 (20:19 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15507 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm

index c3d85d0..de6986e 100644 (file)
@@ -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);
         }
        }