From ffbb0fd3c2238991baa09728bc0da64610de6bfc Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 22 Apr 2021 14:20:27 +0200 Subject: [PATCH] Bug 27811: Hide payment buttons if not enough permission If the logged in librarian does not have the updatecharges > remaining_permissions subpermission, we should hide the 2 "Make payment" and "Pay all fines" button from the patron detail/circ page. Test plan: 1 - Grant an account circulation/staffaccess permissions and any subpermissions in updatechagres but NOT 'remaining_permissions' 2 - Add some charges to a patron account 3 - Sign in with the account created in #1 4 - Bring up the patron you added charges to => The two buttons are not displayed Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc index ccb5ed2df6..c9bb3712fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc @@ -7,7 +7,9 @@ [% IF !Koha.Preference('AllowFineOverride') && NoIssuesCharge && fines > NoIssuesCharge %] Checkouts are BLOCKED because fine balance is OVER THE LIMIT. [% END %] - Make payment - Pay all fines + [% IF CAN_user_updatecharges_remaining_permissions %] + Make payment + Pay all fines + [% END %] [% END %] -- 2.39.5