Lines 2084-2090
sub _dispatch {
Link Here
|
2084 |
sub haspermission { |
2084 |
sub haspermission { |
2085 |
my ( $userid, $flagsrequired ) = @_; |
2085 |
my ( $userid, $flagsrequired ) = @_; |
2086 |
|
2086 |
|
2087 |
return 1 unless defined($flagsrequired); # This is horrifying but restores behaviour prior to bug 22031 |
|
|
2088 |
|
2087 |
|
2089 |
#Koha::Exceptions::WrongParameter->throw('$flagsrequired should not be undef') |
2088 |
#Koha::Exceptions::WrongParameter->throw('$flagsrequired should not be undef') |
2090 |
# unless defined($flagsrequired); |
2089 |
# unless defined($flagsrequired); |
Lines 2094-2099
sub haspermission {
Link Here
|
2094 |
my $row = $sth->fetchrow(); |
2093 |
my $row = $sth->fetchrow(); |
2095 |
my $flags = getuserflags( $row, $userid ); |
2094 |
my $flags = getuserflags( $row, $userid ); |
2096 |
|
2095 |
|
|
|
2096 |
return $flags unless defined($flagsrequired); |
2097 |
return $flags if $flags->{superlibrarian}; |
2097 |
return $flags if $flags->{superlibrarian}; |
2098 |
return _dispatch($flagsrequired, $flags); |
2098 |
return _dispatch($flagsrequired, $flags); |
2099 |
|
2099 |
|
2100 |
- |
|
|