changed fleshed container method to return non-pub buckets without
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 27 Feb 2006 21:21:20 +0000 (21:21 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 27 Feb 2006 21:21:20 +0000 (21:21 +0000)
requiring a permission (in addition to the publick bucket retrievel method)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@3209 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 3ab8c2a..44ade3c 100644 (file)
@@ -85,8 +85,10 @@ sub bucket_flesh {
        my $bkt = $apputils->simplereq( $svc, "$meth.retrieve", $bucket );
        if(!$bkt) {return undef};
 
        my $bkt = $apputils->simplereq( $svc, "$meth.retrieve", $bucket );
        if(!$bkt) {return undef};
 
-       my( $user, $e ) = $apputils->checkrequestor( $staff, $bkt->owner, 'VIEW_CONTAINER' );
-       return $e if $e;
+       if(!$bkt->pub) {
+               my( $user, $e ) = $apputils->checkrequestor( $staff, $bkt->owner, 'VIEW_CONTAINER' );
+               return $e if $e;
+       }
 
        $bkt->items( $apputils->simplereq( $svc,
                "$meth"."_item.search.bucket.atomic", $bucket ) );
 
        $bkt->items( $apputils->simplereq( $svc,
                "$meth"."_item.search.bucket.atomic", $bucket ) );