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:
Colin Kuskie 2007-02-23 23:39:35 +00:00
parent 2803ae520c
commit 2a0eb20bc7
3 changed files with 54 additions and 5 deletions

View file

@ -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)
}
#-------------------------------------------------------------------