[open-ils-commits] r15506 - branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Actor (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Feb 11 15:18:52 EST 2010


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

Modified:
   branches/rel_1_6/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: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm	2010-02-11 20:17:18 UTC (rev 15505)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm	2010-02-11 20:18:47 UTC (rev 15506)
@@ -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