[Koha-patches] [PATCH] Correcting C4::VirtualShelves::ShelfPossibleAction to handle the case where the staff user is the superlibrarian ($user == 0)

Chris Nighswonger chris.nighswonger at liblime.com
Wed Jul 23 06:42:19 CEST 2008


---
 C4/VirtualShelves.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm
index fbb100d..ec55a65 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;
 }
-- 
1.5.5.GIT




More information about the Koha-patches mailing list