aboutsummaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/editusers.cgi b/editusers.cgi
index 9dfc672d9..ed8f974e2 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -155,7 +155,7 @@ sub EmitFormElements ($$$$)
print "<TD COLSPAN=2 ALIGN=LEFT><B>User is a member of these groups</B></TD>\n";
while (MoreSQLData()) {
my ($groupid, $name, $description, $checked, $isderived, $isregexp) = FetchSQLData();
- next if (!$editall && !UserCanBlessGroup($name));
+ next unless ($editall || UserCanBlessGroup($name));
PushGlobalSQLState();
SendSQL("SELECT user_id " .
"FROM user_group_map " .
@@ -762,6 +762,7 @@ if ($action eq 'update') {
my $chggrp = 0;
SendSQL("SELECT id, name FROM groups");
while (my ($groupid, $name) = FetchSQLData()) {
+ next unless ($editall || UserCanBlessGroup($name));
if ($::FORM{"oldgroup_$groupid"} != ($::FORM{"group_$groupid"} ? 1 : 0)) {
# group membership changed
PushGlobalSQLState();