users now require permission to create containers -> bookbags
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Actor / Container.pm
index d5ff96d..98daf0b 100644 (file)
@@ -183,6 +183,11 @@ sub bucket_create {
                        $authtoken, $bucket->owner, 'CREATE_CONTAINER' );
        return $evt if $evt;
 
+       if( $staff->id eq $target->id ) {
+               $evt = $U->check_perms($target->id, $target->home_ou, 'CREATE_MY_CONTAINER');
+               return $evt if $evt;
+       }
+
        $logger->activity( "User " . $staff->id . 
                " creating a new container for user " . $bucket->owner );