diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-10-12 00:06:03 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-10-12 00:06:03 +0200 |
commit | f237dadcc128c26758dee330a6a2df30b6f0811b (patch) | |
tree | 00ec8771ebc6e6c35f115db99e00f0c9178786f2 /lib/AdminPanel | |
parent | 634c11085639aa80caf6e546bd916b5c4f6e89ee (diff) | |
download | manatools-f237dadcc128c26758dee330a6a2df30b6f0811b.tar manatools-f237dadcc128c26758dee330a6a2df30b6f0811b.tar.gz manatools-f237dadcc128c26758dee330a6a2df30b6f0811b.tar.bz2 manatools-f237dadcc128c26758dee330a6a2df30b6f0811b.tar.xz manatools-f237dadcc128c26758dee330a6a2df30b6f0811b.zip |
fixed some of group management
Diffstat (limited to 'lib/AdminPanel')
-rw-r--r-- | lib/AdminPanel/Module/Users.pm | 12 | ||||
-rw-r--r-- | lib/AdminPanel/Shared/Users.pm | 40 |
2 files changed, 24 insertions, 28 deletions
diff --git a/lib/AdminPanel/Module/Users.pm b/lib/AdminPanel/Module/Users.pm index cfe09483..b27d80f2 100644 --- a/lib/AdminPanel/Module/Users.pm +++ b/lib/AdminPanel/Module/Users.pm @@ -1437,17 +1437,16 @@ sub _storeDataFromUserEditPreviousTab { elsif ($previus_tab eq $userEditLabel{groups}) { my $tbl = $self->get_edit_tab_widget('members'); $userData->{members} = undef; - my @members; + my @members; my $i; for($i=0;$i<$tbl->itemsCount();$i++) { push (@members, $tbl->item($i)->label()) if $tbl->toCBYTableItem($tbl->item($i))->checked(); } - $userData->{members} = [ @members ]; + $userData->{members} = \@members; if ($self->get_edit_tab_widget('primary_group')->selectedItem()) { - my $Gent = $self->sh_users->ctx->LookupGroupByName($self->get_edit_tab_widget('primary_group')->selectedItem()->label()); - my $primgroup = $Gent->Gid($self->sh_users->USER_GetValue); - + my $groupname = $self->get_edit_tab_widget('primary_group')->selectedItem()->label(); + my $primgroup = $self->sh_users->groupID($groupname); $userData->{primary_group} = $primgroup; } else { @@ -1725,8 +1724,6 @@ sub _groupUsersTabWidget { my $groupEnt = $self->sh_users->ctx->LookupGroupByName($groupData{groupname}); my $users = $self->sh_users->getUsers(); - $DB::single = 1; - my @susers = sort(@$users); my $itemCollection = new yui::YItemCollection; @@ -1901,7 +1898,6 @@ sub _userEdit_Ok { my $members = $userData->{members}; foreach my $group (@sgroups) { - my $gEnt = $self->sh_users->ctx->LookupGroupByName($group); my $ugid = $gEnt->Gid($self->sh_users->USER_GetValue); my $m = $gEnt->MemberName(1,0); diff --git a/lib/AdminPanel/Shared/Users.pm b/lib/AdminPanel/Shared/Users.pm index 85650634..237fee98 100644 --- a/lib/AdminPanel/Shared/Users.pm +++ b/lib/AdminPanel/Shared/Users.pm @@ -490,26 +490,6 @@ sub getGoups { return $self->ctx->GroupsEnumerate; } -#============================================================= - -=head2 getUsers - -=head3 OUTPUT - - $users: ARRAY reference containing all the users - -=head3 DESCRIPTION - - This method return the configured users - -=cut - -#============================================================= -sub getUsers { - my $self = shift; - - return $self->ctx->UsersEnumerate; -} #============================================================= @@ -814,6 +794,26 @@ sub getGroupsInfo { return $groupsInfo; } +#============================================================= + +=head2 getUsers + +=head3 OUTPUT + + $users: ARRAY reference containing all the users + +=head3 DESCRIPTION + + This method return the configured users + +=cut + +#============================================================= +sub getUsers { + my $self = shift; + + return $self->ctx->UsersEnumerate; +} #============================================================= |