Bug 27811: Hide payment buttons if not enough permission
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 22 Apr 2021 12:20:27 +0000 (14:20 +0200)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Tue, 25 May 2021 11:05:48 +0000 (11:05 +0000)
commit5b940a29477dba57333a9f2595f4cc51942eabd3
tree4ec4f6d17bc89a7a442f2d55b84b61963ce7032b
parent3dfa6ed84074d013c4f27de7af424df619af966a
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 <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ffbb0fd3c2238991baa09728bc0da64610de6bfc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7221b6860cee3a723817e5195bc5faa331b03b47)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc