Correcting C4::VirtualShelves::ShelfPossibleAction to handle the case where the staff...
authorChris Nighswonger <chris.nighswonger@liblime.com>
Wed, 23 Jul 2008 04:42:19 +0000 (23:42 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 23 Jul 2008 11:49:53 +0000 (06:49 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/VirtualShelves.pm

index fbb100d..ec55a65 100644 (file)
@@ -476,7 +476,7 @@ sub ShelfPossibleAction {
        return 1 if ( $category >= 3);                                                  # open list
     return 1 if (($category >= 2) and
                                defined($action) and $action eq 'view');        # public list, anybody can view
-    return 1 if (($category >= 2) and defined($user) and $borrower->{authflags}->{superlibrarian});    # public list, superlibrarian can edit/delete
+    return 1 if (($category >= 2) and defined($user) and ($borrower->{authflags}->{superlibrarian} || $user == 0));    # public list, superlibrarian can edit/delete
     return 1 if (defined($user)  and $owner  eq $user );       # user owns this list.  Check last.
     return 0;
 }