Some libraries prefer not to allow staff to create manual invoices and/or manual credits on patron accounts. These tabs in the patron account are not easily hidden via CSS as they don't have distinct classes. We should give these tabs distinct classes to aid in manipulation via CSS. Alternatively/additionally, we could add system preferences to actually disable these features entirely.
Created attachment 132031 [details] [review] Bug 30335: Add classes to invoice/credit tabs on patron accouting pages To test: 1. Apply patch and go to the patron accounting page. 2. Notice the class names for each list element on the page. 3. You can use the following CSS to try hiding each of the tabs: .transactions { display: none; } .makepayment { display: none; } .manualinvoice { display: none; } .manualcredit { display: none; }
Created attachment 136796 [details] [review] Bug 30335: Add classes to invoice/credit tabs on patron accouting pages To test: 1. Apply patch and go to the patron accounting page. 2. Notice the class names for each list element on the page. 3. You can use the following CSS to try hiding each of the tabs: .transactions { display: none; } .makepayment { display: none; } .manualinvoice { display: none; } .manualcredit { display: none; } Signed-off-by: rachael <rachael@inlibro.com>
Created attachment 137777 [details] [review] Bug 30335: Add classes to invoice/credit tabs on patron accouting pages To test: 1. Apply patch and go to the patron accounting page. 2. Notice the class names for each list element on the page. 3. You can use the following CSS to try hiding each of the tabs: .transactions { display: none; } .makepayment { display: none; } .manualinvoice { display: none; } .manualcredit { display: none; } Signed-off-by: Rachael Laritz <rachael@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 137778 [details] [review] Bug 30335: (follow-up) Add permissions for manual accounts options This patch adds two new sub-permissions, `manual_credit` and `manual_invoice` to allow/prevent staff the ability to add manual invoices and credits to a patrons account. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 137779 [details] [review] Bug 30335: (follow-up) Bind new permissions to pages and tabs This patch binds the new permissions added in the previous patch to the tab display on the borrower account page. Test plan 1) Apply the previous patch and run the database update 2) Configure a user without the new permissions 3) Confirm the 'Create manual invoice' and 'Create manual credit' tabs no longer appear under the 'Accounting' area when logged in as the above user. 4) Confirm that you cannot manually navigate to /members/mancredit.pl or /members/maninvoice.pl when logged in as the above user. 5) Confirm that users with the above permissions are still able to see the tabs and take actions on them. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Couldn't help myself.. there was a suggestion here to use system preferences.. I felt user permissions made even more sense.. Follow-ups added to enhance this enhancement.
Setting back to NSO to get an independent eye on my follow-ups.
Created attachment 137784 [details] [review] Bug 30335: (follow-up) Ensure existing users remain permitted This patch updates the database update to ensure users with the 'remaining_permissions' subpermission of 'updatecharges' continue to be able to manually invoice and manually credit borrower accounts after the patch is applied.
Created attachment 137845 [details] [review] Bug 30335: Add classes to invoice/credit tabs on patron accouting pages To test: 1. Apply patch and go to the patron accounting page. 2. Notice the class names for each list element on the page. 3. You can use the following CSS to try hiding each of the tabs: .transactions { display: none; } .makepayment { display: none; } .manualinvoice { display: none; } .manualcredit { display: none; } Signed-off-by: Rachael Laritz <rachael@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 137846 [details] [review] Bug 30335: (follow-up) Add permissions for manual accounts options This patch adds two new sub-permissions, `manual_credit` and `manual_invoice` to allow/prevent staff the ability to add manual invoices and credits to a patrons account. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 137847 [details] [review] Bug 30335: (follow-up) Bind new permissions to pages and tabs This patch binds the new permissions added in the previous patch to the tab display on the borrower account page. Test plan 1) Apply the previous patch and run the database update 2) Configure a user without the new permissions 3) Confirm the 'Create manual invoice' and 'Create manual credit' tabs no longer appear under the 'Accounting' area when logged in as the above user. 4) Confirm that you cannot manually navigate to /members/mancredit.pl or /members/maninvoice.pl when logged in as the above user. 5) Confirm that users with the above permissions are still able to see the tabs and take actions on them. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 137848 [details] [review] Bug 30335: (follow-up) Ensure existing users remain permitted This patch updates the database update to ensure users with the 'remaining_permissions' subpermission of 'updatecharges' continue to be able to manually invoice and manually credit borrower accounts after the patch is applied. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Awesome, thanks Katrin. Setting to PQA now :)
Pushed to master for 22.11. Nice work everyone, thanks!
Enhancement will not be included in the 22.05.x series