diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-10-11 22:52:29 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-10-11 22:52:29 +0200 |
commit | 40d7b7f5f382c62613edc38498baad930dec8f63 (patch) | |
tree | e4d54f2df870f3a45aa4b8e83d9a2cddee5263a1 /lib | |
parent | 21cc701e6c2540d37fcff33cc850e0a814b28554 (diff) | |
download | manatools-40d7b7f5f382c62613edc38498baad930dec8f63.tar manatools-40d7b7f5f382c62613edc38498baad930dec8f63.tar.gz manatools-40d7b7f5f382c62613edc38498baad930dec8f63.tar.bz2 manatools-40d7b7f5f382c62613edc38498baad930dec8f63.tar.xz manatools-40d7b7f5f382c62613edc38498baad930dec8f63.zip |
Fixed getGroups and getUsers management and usage
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AdminPanel/Module/Users.pm | 10 | ||||
-rw-r--r-- | lib/AdminPanel/Shared/Users.pm | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/lib/AdminPanel/Module/Users.pm b/lib/AdminPanel/Module/Users.pm index b493e09f..cfe09483 100644 --- a/lib/AdminPanel/Module/Users.pm +++ b/lib/AdminPanel/Module/Users.pm @@ -1724,7 +1724,9 @@ sub _groupUsersTabWidget { $groupUsersWidget{members} = $mgaFactory->createCBTable($layout, $yTableHeader, $yui::YCBTableCheckBoxOnFirstColumn); my $groupEnt = $self->sh_users->ctx->LookupGroupByName($groupData{groupname}); - my $users = $self->sh_users->ctx->UsersEnumerate; + my $users = $self->sh_users->getUsers(); + $DB::single = 1; + my @susers = sort(@$users); my $itemCollection = new yui::YItemCollection; @@ -1769,7 +1771,7 @@ sub _userGroupsTabWidget { $userGroupsWidget{members} = $mgaFactory->createCBTable($layout, $yTableHeader, $yui::YCBTableCheckBoxOnFirstColumn); - my $grps = $self->sh_users->ctx->GroupsEnumerate; + my $grps = $self->sh_users->getGoups(); my @sgroups = sort @$grps; my $itemCollection = new yui::YItemCollection; @@ -1829,7 +1831,7 @@ sub _groupEdit_Ok { my $members = $groupData{members}; my $gid = $groupEnt->Gid($self->sh_users->USER_GetValue); - my $users = $self->sh_users->ctx->UsersEnumerate; + my $users = $self->sh_users->getUsers(); my @susers = sort(@$users); foreach my $user (@susers) { @@ -1894,7 +1896,7 @@ sub _userEdit_Ok { $userEnt->HomeDir($userData->{homedir}); $userEnt->LoginShell($userData->{shell}); my $username = $userEnt->UserName($self->sh_users->USER_GetValue); - my $grps = $self->sh_users->ctx->GroupsEnumerate; + my $grps = $self->sh_users->getGoups(); my @sgroups = sort @$grps; my $members = $userData->{members}; diff --git a/lib/AdminPanel/Shared/Users.pm b/lib/AdminPanel/Shared/Users.pm index 74ad553b..85650634 100644 --- a/lib/AdminPanel/Shared/Users.pm +++ b/lib/AdminPanel/Shared/Users.pm @@ -485,9 +485,9 @@ sub updateOrDelUserInGroup { #============================================================= sub getGoups { - my $self = shelf; + my $self = shift; - return $self->GroupsEnumerate; + return $self->ctx->GroupsEnumerate; } #============================================================= @@ -506,7 +506,7 @@ sub getGoups { #============================================================= sub getUsers { - my $self = shelf; + my $self = shift; return $self->ctx->UsersEnumerate; } |