From 1a30da5187ac87a2aa7536f56c0b09ae3f446a65 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 31 Aug 2012 11:48:51 +0200 Subject: [PATCH] 8706 Protect private lists for anonymous users Content-Type: text/plain; charset="utf-8" --- C4/VirtualShelves.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 20f3620..c235985 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; -- 1.7.7.6