Bug 20128: (QA follow-up) Corrections to haspermission
[koha-equinox.git] / C4 / Auth.pm
index 5a0df07..9ac819b 100644 (file)
@@ -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);