aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AdminPanel')
-rw-r--r--lib/AdminPanel/Module/Users.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/AdminPanel/Module/Users.pm b/lib/AdminPanel/Module/Users.pm
index 12925e1e..b32b9485 100644
--- a/lib/AdminPanel/Module/Users.pm
+++ b/lib/AdminPanel/Module/Users.pm
@@ -601,7 +601,7 @@ sub _addGroupDialog {
## check data
my $groupname = $groupName->value();
my ($continue, $errorString) = $self->sh_users->valid_groupname($groupname);
- my $nm = $continue && $self->sh_users->groupNameExist($groupname);
+ my $nm = $continue && $self->sh_users->groupNameExists($groupname);
if ($nm) {
$groupName->setValue("");
$errorString = $self->loc->N("Group already exists, please choose another Group Name");
@@ -1200,8 +1200,17 @@ sub _refreshGroups {
if ($filtergroups && $g->Gid($self->sh_users->USER_GetValue) > 499 && $g->Gid($self->sh_users->USER_GetValue) < 1000) {
my $groupname = $g->GroupName($self->sh_users->USER_GetValue);
my $l = $self->sh_users->ctx->LookupUserByName($groupname);
- next if ! defined($l);
- next LOOP if $l->HomeDir($self->sh_users->USER_GetValue) =~ /^\/($|var\/|run\/)/ || $l->LoginShell($self->sh_users->USER_GetValue) =~ /(nologin|false)$/;
+ if (!defined($l)) {
+ my $members = $self->sh_users->ctx->EnumerateUsersByGroup($groupname);
+ next LOOP if !scalar(@{$members});
+ foreach my $username (@$members) {
+ my $userEnt = $self->sh_users->ctx->LookupUserByName($username);
+ next LOOP if $userEnt->HomeDir($self->sh_users->USER_GetValue) =~ /^\/($|var\/|run\/)/ || $userEnt->LoginShell($self->sh_users->USER_GetValue) =~ /(nologin|false)$/;
+ }
+ }
+ else {
+ next LOOP if $l->HomeDir($self->sh_users->USER_GetValue) =~ /^\/($|var\/|run\/)/ || $l->LoginShell($self->sh_users->USER_GetValue) =~ /(nologin|false)$/;
+ }
}
push @GroupReal, $g if $g->GroupName($self->sh_users->USER_GetValue) =~ /^\Q$strfilt/;