Bug 13888: (follow-up) fix for create_public_lists

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
PerplexedTheta 2024-07-10 09:02:42 +01:00 committed by Martin Renvoize
parent e38e4bee94
commit e9242adf94
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -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;