Summary: | Clarify subpermissions check behavior in C4::Auth | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi <tomascohen> |
Status: | Pushed to oldstable --- | QA Contact: | Martin Renvoize <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | dcook, fridolin.somers, lucas, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.05.00,23.11.04,23.05.10
|
|
Circulation function: | |||
Attachments: |
Bug 36056: Clarify subpermissions AND behavior
Bug 36056: Clarify subpermissions AND behavior |
Description
Tomás Cohen Arazi
2024-02-09 02:13:13 UTC
Created attachment 161957 [details] [review] Bug 36056: Clarify subpermissions AND behavior Working on bug 31791, I found myself wondering if our current recursive code in C4::Auth::haspermission() would allow checking AND on subpermissions. As it is not documented in the POD or tested, I decided to write some unit tests for it. It turned out it was well supported, so I decided to submit the tests, and a small tweak in the POD to reflect that. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Auth/haspermission.t => SUCCESS: Tests pass! The code supports AND on subpermissions! 3. Sign off :-D Created attachment 161958 [details] [review] Bug 36056: Clarify subpermissions AND behavior Working on bug 31791, I found myself wondering if our current recursive code in C4::Auth::haspermission() would allow checking AND on subpermissions. As it is not documented in the POD or tested, I decided to write some unit tests for it. It turned out it was well supported, so I decided to submit the tests, and a small tweak in the POD to reflect that. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Auth/haspermission.t => SUCCESS: Tests pass! The code supports AND on subpermissions! 3. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Straight QA here, simple improvements to clarify and enhance testing of existing functionality. Thanks Tomas Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.04 Backported to 23.05.x for upcoming 23.05.10. |