Bugzilla – Attachment 86407 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: Restore exact behaviour of undef
Bug-22483-Restore-exact-behaviour-of-undef.patch (text/plain), 1.21 KB, created by
Martin Renvoize (ashimema)
on 2019-03-09 08:14:37 UTC
(
hide
)
Description:
Bug 22483: Restore exact behaviour of undef
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-03-09 08:14:37 UTC
Size:
1.21 KB
patch
obsolete
>From 1a83ee9c64d9f1c2776a8e3025c77088253d97d9 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Sat, 9 Mar 2019 08:13:03 +0000 >Subject: [PATCH] Bug 22483: Restore exact behaviour of undef > >Passing undef (or nothing) as $flagsrequired to haspermission simply >returned the return from fetchrow prior to this patch. Restoring that >behaviour. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Auth.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 2b76accf11..c3ba5baad2 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -2084,7 +2084,6 @@ sub _dispatch { > sub haspermission { > my ( $userid, $flagsrequired ) = @_; > >- return 1 unless defined($flagsrequired); # This is horrifying but restores behaviour prior to bug 22031 > > #Koha::Exceptions::WrongParameter->throw('$flagsrequired should not be undef') > # unless defined($flagsrequired); >@@ -2094,6 +2093,7 @@ sub haspermission { > my $row = $sth->fetchrow(); > my $flags = getuserflags( $row, $userid ); > >+ return $flags unless defined($flagsrequired); > return $flags if $flags->{superlibrarian}; > return _dispatch($flagsrequired, $flags); > >-- >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