From 4e4dfa7e79249a79089e7367a5bfd3cf1d486131 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 26 Feb 2023 11:20:34 +0000 Subject: [PATCH] Bug 32976: Add permission check on Add/Edit controls for patron images This adds a check on the batch_upload_patron_images permission to the Add/Edit control for patron images in the patron account in the staff interface. To test: * Enable patronimages system preference * With your 'superlibrarian' account: * Add and edit/remove a patron image to an account * Create a staff user with batch_upload_patron_images permission * Log in with this user and verify everything works the same as before * Remove the batch_upload_patron_images permission * Verify the Add/Edit controls are on longer visible to this patron Signed-off-by: Owen Leonard Signed-off-by: Christopher Brannon Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index be02b213ec3..2e04c4e5ea3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -36,14 +36,18 @@
[% IF ( patron.image ) %] [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %]) -
- -
+ [% IF ( CAN_user_tools_batch_upload_patron_images ) %] +
+ +
+ [% END %] [% ELSE %]
-
- -
+ [% IF ( CAN_user_tools_batch_upload_patron_images ) %] +
+ +
+ [% END %] [% END %]
-- 2.25.1