Bugzilla – Attachment 86393 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: (QA follow-up) Tweaking call to haspermission
Bug-22483-QA-follow-up-Tweaking-call-to-haspermiss.patch (text/plain), 1.08 KB, created by
Kyle M Hall (khall)
on 2019-03-08 18:15:19 UTC
(
hide
)
Description:
Bug 22483: (QA follow-up) Tweaking call to haspermission
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-03-08 18:15:19 UTC
Size:
1.08 KB
patch
obsolete
>From ae1520b73c235a3ff3f1cf03ae05760a0fa63600 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 8 Mar 2019 15:10:20 +0000 >Subject: [PATCH] Bug 22483: (QA follow-up) Tweaking call to haspermission > >This patch tweaks the logic to check the permissions is defined before >passing to haspermission. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/REST/V1/Auth.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/REST/V1/Auth.pm b/Koha/REST/V1/Auth.pm >index 92cafc22f2..53c6bacfc9 100644 >--- a/Koha/REST/V1/Auth.pm >+++ b/Koha/REST/V1/Auth.pm >@@ -229,7 +229,7 @@ sub authenticate_api_request { > > my $permissions = $authorization->{'permissions'}; > # Check if the user is authorized >- if ( haspermission($user->userid, $permissions) >+ if ( ( defined($permissions) and haspermission($user->userid, $permissions) ) > or allow_owner($c, $authorization, $user) > or allow_guarantor($c, $authorization, $user) ) { > >-- >2.17.2 (Apple Git-113)
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