From 4d8963d9c92ec58c90007d645eb9547416c30dd0 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Tue, 22 Jul 2008 23:42:19 -0500 Subject: [PATCH] Correcting C4::VirtualShelves::ShelfPossibleAction to handle the case where the staff user is the superlibrarian ($user == 0) Signed-off-by: Joshua Ferraro --- C4/VirtualShelves.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index fbb100df53..ec55a6534b 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -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; } -- 2.20.1