[Koha-bugs] [Bug 36056] Clarify subpermissions check behavior in C4::Auth

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 9 08:30:19 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36056

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #161957|0                           |1
        is obsolete|                            |

--- Comment #2 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 161958
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161958&action=edit
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 at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list