Bugzilla – Attachment 87740 Details for
Bug 20128
Permission for advanced editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20128: (QA follow-up) Corrections to haspermission
Bug-20128-QA-follow-up-Corrections-to-haspermissio.patch (text/plain), 1.74 KB, created by
Katrin Fischer
on 2019-04-10 21:40:05 UTC
(
hide
)
Description:
Bug 20128: (QA follow-up) Corrections to haspermission
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-10 21:40:05 UTC
Size:
1.74 KB
patch
obsolete
>From d33d344be5445065171fff01a7f5a4e080c8db58 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 21 Mar 2019 10:16:34 +0000 >Subject: [PATCH] Bug 20128: (QA follow-up) Corrections to haspermission > >The haspermission routine wrongly assumed that get_user_subpermissions >would return a list of all subpermissions if the user had the top level >permission, but instead if just returns 1. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Auth.pm | 2 +- > t/db_dependent/Auth/haspermission.t | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 39c6a6c95c..2d2ecb979c 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -2066,6 +2066,7 @@ sub _dispatch { > } > } elsif ($ref eq 'HASH') { > foreach my $key (keys %{$required}) { >+ next if $flags == 1; > my $require = $required->{$key}; > my $rflags = $flags->{$key}; > return 0 unless _dispatch($require, $rflags); >@@ -2090,7 +2091,6 @@ sub _dispatch { > sub haspermission { > my ( $userid, $flagsrequired ) = @_; > >- > #Koha::Exceptions::WrongParameter->throw('$flagsrequired should not be undef') > # unless defined($flagsrequired); > >diff --git a/t/db_dependent/Auth/haspermission.t b/t/db_dependent/Auth/haspermission.t >index 0eb6c3c3c5..064422b013 100644 >--- a/t/db_dependent/Auth/haspermission.t >+++ b/t/db_dependent/Auth/haspermission.t >@@ -111,7 +111,7 @@ subtest 'scalar top level tests' => sub { > > subtest 'hashref top level AND tests' => sub { > >- plan tests => 15; >+ plan tests => 16; > > # Check top level permission for superlibrarian > my $r = >-- >2.11.0
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 20128
:
83416
|
86198
|
86208
|
86543
|
86706
|
86707
|
86840
|
87738
|
87739
| 87740 |
87741
|
88196
|
88197