From 1b041972c0ac3f18b38ce67134cc957c414dbfe6 Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Thu, 4 Apr 2024 18:29:07 +0000 Subject: [PATCH] Bug 35980: Check for CAN_user_borrowers_edit_borrowers in patron-toolbar.inc This patch removes the 'New patron' and 'Quick add new patron' buttons from the patron tool bar that's included on members-home.pl To test: 1. Log in with a user with only 'catalogue', 'list_borrowers' and 'manage_patron_lists' permissions 2. From the main page click on Patrons 3. Notice there are 'New patron' and 'Quick add new patron' buttons in the members-home.pl page that lead to permissions errors 4. Apply patch, restart all, reload the page 5. Notice the buttons to add new patrons are gone, but the button to manage patron lists is still there Signed-off-by: Esther Signed-off-by: Julian Maurice Signed-off-by: Katrin Fischer (cherry picked from commit 0b4bb48f2c8826e1837abe4b1218b89fd3ec3dd8) Signed-off-by: Fridolin Somers --- .../prog/en/includes/patron-toolbar.inc | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc index 8b6abc7bc1..85d8ed21fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc @@ -4,19 +4,21 @@ [% UNLESS ( no_add ) %]
-
- - -
- [% IF Koha.Preference('PatronQuickAddFields') || Koha.Preference('BorrowerMandatoryField') %] -
- - -
+ [% IF CAN_user_borrowers_edit_borrowers %] +
+ + +
+ [% IF Koha.Preference('PatronQuickAddFields') || Koha.Preference('BorrowerMandatoryField') %] +
+ + +
+ [% END %] [% END %] [% IF CAN_user_tools_manage_patron_lists %] Patron lists -- 2.39.5