fix crash when attempting login as user w/o 'catalogue' permission
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
fc6ccb1a61
commit
7a2a241fa3
1 changed files with 5 additions and 1 deletions
|
@ -1341,7 +1341,11 @@ sub haspermission {
|
|||
return 0 unless ( $flags->{$module} == 1 or ref($flags->{$module}) );
|
||||
} else {
|
||||
return 0 unless ( $flags->{$module} == 1 or
|
||||
( exists $flags->{$module}->{$subperm} and $flags->{$module}->{$subperm} == 1 ) );
|
||||
( ref($flags->{$module}) and
|
||||
exists $flags->{$module}->{$subperm} and
|
||||
$flags->{$module}->{$subperm} == 1
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
return 0 unless ( $flags->{$module} );
|
||||
|
|
Loading…
Reference in a new issue