Bugzilla – Attachment 86380 Details for
Bug 22483
haspermissions previously supported passing 'undef' for $flagsrequired
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22483: (follow-up) Improve POD as requested in bug 22031
Bug-22483-follow-up-Improve-POD-as-requested-in-bu.patch (text/plain), 1.64 KB, created by
Martin Renvoize (ashimema)
on 2019-03-08 12:51:49 UTC
(
hide
)
Description:
Bug 22483: (follow-up) Improve POD as requested in bug 22031
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-03-08 12:51:49 UTC
Size:
1.64 KB
patch
obsolete
>From a6d6548341d7e9be6853d0c49bf066cde13c35e6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 8 Mar 2019 12:49:10 +0000 >Subject: [PATCH] Bug 22483: (follow-up) Improve POD as requested in bug 22031 > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Auth.pm | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index c49076e205..963584a185 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -2024,14 +2024,21 @@ sub get_all_subpermissions { > > =head2 haspermission > >+ $flagsrequired = '*'; # Any permission at all >+ $flagsrequired = 'a_flag'; # a_flag must be satisfied (all subpermissions) >+ $flagsrequired = [ 'a_flag', 'b_flag' ]; # a_flag OR b_flag must be satisfied >+ $flagsrequired = { 'a_flag => 1, 'b_flag' => 1 }; # a_flag AND b_flag must be satisfied >+ $flagsrequired = { 'a_flag' => 'sub_a' }; # sub_a of a_flag must be satisfied >+ $flagsrequired = { 'a_flag' => [ 'sub_a, 'sub_b' ] }; # sub_a OR sub_b of a_flag must be satisfied >+ > $flags = ($userid, $flagsrequired); > > C<$userid> the userid of the member > C<$flags> is a query structure similar to that used by SQL::Abstract that >-denotes the combination of flags required. >+denotes the combination of flags required. It is a required parameter. > > The main logic of this method is that things in arrays are OR'ed, and things >-in hashes are AND'ed. >+in hashes are AND'ed. The `*` character can be used, at any depth, to denote `ANY` > > Returns member's flags or 0 if a permission is not met. > >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22483
:
86379
|
86380
|
86385
|
86386
|
86388
|
86389
|
86390
|
86391
|
86392
|
86393
|
86394
|
86395
|
86407
|
86408
|
86409
|
86410