From baeb1721df8789d73889a9a2b18920d26143fbcd 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 --- .../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 f4c2295483..924c1563b8 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.30.2