From e9242adf948a6bfb22b3c6ea45021dab442c203a Mon Sep 17 00:00:00 2001 From: PerplexedTheta Date: Wed, 10 Jul 2024 09:02:42 +0100 Subject: [PATCH] Bug 13888: (follow-up) fix for create_public_lists Signed-off-by: Roman Dolny Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize --- virtualshelves/shelves.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index c1f1dc7640..d52d87c30c 100755 --- a/virtualshelves/shelves.pl +++ b/virtualshelves/shelves.pl @@ -61,7 +61,7 @@ my ( $public, $shelf, $shelfnumber, @messages, $allow_transfer, $allow_create_pu # work out permissions once # this check is for the create list permission -$allow_create_public_lists = haspermission( $loggedinuser, { lists => 'create_public_lists' } ) ? 1 : 0; +$allow_create_public_lists = haspermission( C4::Context->userenv->{id}, { lists => 'create_public_lists' } ) ? 1 : 0; # we want the user to be able to pick if public or private only if they are allowed $public = ( $query->param('public') == 1 && $allow_create_public_lists == 1 ) ? 1 : 0; -- 2.39.5