pay.pl requires 'remaining_permissions' but links to pay.pl show in a patrons account if you have any of the other subpermissions. To recreate: 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 5 - You see the accounting tab and option to pay fines 6 - Clicking on those lead to a log in screen
Created attachment 120002 [details] [review] 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
Created attachment 120003 [details] [review] Bug 27811: Hide the Accounting tab if needed Same as the previous patch for the "Accounting" tab of the circulation module.
Created attachment 120303 [details] [review] 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>
Created attachment 120304 [details] [review] Bug 27811: Hide the Accounting tab if needed Same as the previous patch for the "Accounting" tab of the circulation module. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Trivial fix, passing QA
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.06
Pushed to 20.05.x for 20.05.12
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.