| Summary: | Debit and credit type pages should check for the specific permission | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
| Component: | Architecture, internals, and plumbing | Assignee: | Katrin Fischer <katrin.fischer> |
| Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | lucas, martin.renvoize |
| Version: | Main | Keywords: | Academy |
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25768 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: |
20.11.00
|
|
| Circulation function: | |||
| Attachments: |
Bug 26721: Fix permission check on debit and credit type admin pages
Bug 26721: Fix permission check on debit and credit type admin pages Bug 26721: Fix permission check on debit and credit type admin pages |
||
Created attachment 111947 [details] [review] Bug 26721: Fix permission check on debit and credit type admin pages At the moment the pages falsely check for parameters_remaining_permissions, but they should check the specific manage_accounts permission. To test: - Create a new staff user with only catalog and manage_acccounts permissions - Log in with this staff user and go to the admin page - You will see the debit and credit type sections, but won't be able to access them - Apply the patch - Veriy the links still show, but pages are now accessible Created attachment 112481 [details] [review] Bug 26721: Fix permission check on debit and credit type admin pages At the moment the pages falsely check for parameters_remaining_permissions, but they should check the specific manage_accounts permission. To test: - Create a new staff user with only catalog and manage_acccounts permissions - Log in with this staff user and go to the admin page - You will see the debit and credit type sections, but won't be able to access them - Apply the patch - Veriy the links still show, but pages are now accessible Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Created attachment 112825 [details] [review] Bug 26721: Fix permission check on debit and credit type admin pages At the moment the pages falsely check for parameters_remaining_permissions, but they should check the specific manage_accounts permission. To test: - Create a new staff user with only catalog and manage_acccounts permissions - Log in with this staff user and go to the admin page - You will see the debit and credit type sections, but won't be able to access them - Apply the patch - Veriy the links still show, but pages are now accessible Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Dang.. how did I get these mismatched! Works as expected, thanks for the fix Katrin. Passing QA Pushed to master for 20.11, thanks to everybody involved! does not apply cleanly to 20.05.x, no backport |
At the moment, the pages check for: admin/credit_types.pl: flagsrequired => { parameters => 'parameters_remaining_permissions' }, admin/debit_types.pl: flagsrequired => { parameters => 'parameters_remaining_permissions' }, But the templates like admin home page check for the correct specific permission: [% IF ( CAN_user_parameters_manage_accounts ) %]