Tests for the canUseAdminMode method of User.pm
Uncovered and fixed a bug where $session->user instead of $self was used in canUseAdminMode Added an explicit test in Config.pm to make sure that array refs can be passed to ->set.
This commit is contained in:
parent
2803ae520c
commit
2a0eb20bc7
3 changed files with 54 additions and 5 deletions
|
|
@ -134,7 +134,8 @@ sub canUseAdminMode {
|
|||
if (scalar(@$subnets)) {
|
||||
$pass = WebGUI::Utility::isInSubnet($self->session->env->getIp, $subnets);
|
||||
}
|
||||
return $pass && $self->session->user->isInGroup(12)
|
||||
|
||||
return $pass && $self->isInGroup(12)
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue