]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 233486: Only process groups user is supposed to be able to bless in editgroups.cgi
authorbugreport%peshkin.net <>
Sat, 10 Jul 2004 14:39:56 +0000 (14:39 +0000)
committerbugreport%peshkin.net <>
Sat, 10 Jul 2004 14:39:56 +0000 (14:39 +0000)
r=justdave
a=justdave

editusers.cgi

index 9dfc672d9bdaec5602a26f580a8dfe0189c6fbe6..ed8f974e276963217ebdaa196e02c1b955448bbb 100755 (executable)
@@ -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();