@@ -, +, @@ --- C4/Auth.pm | 2 +- t/db_dependent/Auth/haspermission.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -2060,6 +2060,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); @@ -2084,7 +2085,6 @@ sub _dispatch { sub haspermission { my ( $userid, $flagsrequired ) = @_; - #Koha::Exceptions::WrongParameter->throw('$flagsrequired should not be undef') # unless defined($flagsrequired); --- a/t/db_dependent/Auth/haspermission.t +++ a/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 = --