From a1041bdd585a0ff1582b4ae27be3aaec9f68e3ef Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 5 Jan 2021 11:35:05 +0100 Subject: [PATCH] Bug 27345: Add missing global permissions for superlibrarian When a superlibrarian is logged in, C4::Auth::get_template_and_user pass the CAN_user_$flag to the template, but some are missing: suggestions, lists, cash_management So far they are not used in the template but it will avoid a developer to spend time on it if we fix it now. Test plan: Compare with installer/data/mysql/mandatory/userflags.sql Note that we don't need selfcheck Signed-off-by: David Cook Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart (cherry picked from commit 8c9acd7f28f3204ffb13cf18894a47fcf3f17c85) Signed-off-by: Fridolin Somers --- C4/Auth.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index d2d7c0f392..675344d4a5 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -319,17 +319,20 @@ sub get_template_and_user { $template->param( CAN_user_editcatalogue => 1 ); $template->param( CAN_user_updatecharges => 1 ); $template->param( CAN_user_acquisition => 1 ); + $template->param( CAN_user_suggestions => 1 ); $template->param( CAN_user_tools => 1 ); $template->param( CAN_user_editauthorities => 1 ); $template->param( CAN_user_serials => 1 ); $template->param( CAN_user_reports => 1 ); $template->param( CAN_user_staffaccess => 1 ); - $template->param( CAN_user_plugins => 1 ); $template->param( CAN_user_coursereserves => 1 ); + $template->param( CAN_user_plugins => 1 ); + $template->param( CAN_user_lists => 1 ); $template->param( CAN_user_clubs => 1 ); $template->param( CAN_user_ill => 1 ); $template->param( CAN_user_stockrotation => 1 ); - $template->param( CAN_user_problem_reports => 1 ); + $template->param( CAN_user_cash_management => 1 ); + $template->param( CAN_user_problem_reports => 1 ); foreach my $module ( keys %$all_perms ) { foreach my $subperm ( keys %{ $all_perms->{$module} } ) { -- 2.39.5