diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 25d092af25..8c0b15e275 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -464,7 +464,7 @@ sub ShelfPossibleAction { $sth->execute($user, $shelfnumber); my $shelf= $sth->fetchrow_hashref; - return 0 unless $shelf && ($shelf->{category}==2 || $shelf->{owner}==$user || $shelf->{borrowernumber}==$user); + return 0 unless $shelf && ($shelf->{category}==2 || $shelf->{owner}==$user || ($user && $shelf->{borrowernumber}==$user)); if($action eq 'view') { #already handled in the above condition return 1;