[open-ils-commits] r15507 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Feb 11 15:19:23 EST 2010


Author: phasefx
Date: 2010-02-11 15:19:18 -0500 (Thu, 11 Feb 2010)
New Revision: 15507

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm
Log:
Use the home library of the bucket owner as the context org for the VIEW_CONTAINER permission

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm	2010-02-11 20:18:47 UTC (rev 15506)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm	2010-02-11 20:19:18 UTC (rev 15507)
@@ -97,7 +97,9 @@
 	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);
         }
 	}
 



More information about the open-ils-commits mailing list