From 8964c07f2ae30c0503519fbee3f9406eb3a2fff5 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 11 Feb 2010 20:17:18 +0000 Subject: [PATCH] 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_0@15505 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } } -- 2.11.0