From 7e784d9f013a1a1a375d1c0ce2f3395c67bde4a6 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 --- C4/Auth.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 771c457fc5..2ff50bf421 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -320,17 +320,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.20.1