Correcting C4::VirtualShelves::ShelfPossibleAction to handle the case where the staff user is the superlibrarian ($user == 0)

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Chris Nighswonger 2008-07-22 23:42:19 -05:00 committed by Joshua Ferraro
parent ed762eb989
commit 4d8963d9c9

View 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;
}