]> git.koha-community.org Git - koha.git/commit
Bug 36056: Clarify subpermissions AND behavior
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 8 Feb 2024 21:29:54 +0000 (21:29 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 11 Mar 2024 10:23:45 +0000 (11:23 +0100)
commit26ba5fba8be7eee3d931c2d6ef774860145780f0
treea91ffa9d2d4e54ed206c23354af603408a3c300b
parent118012dcd8a5327824427788ffdf7be3d8b99553
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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit aa1049fdd37d87b73c434dfdea11ba691e7095da)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Auth.pm
t/db_dependent/Auth/haspermission.t