From: bugreport%peshkin.net <>
Date: Sat, 10 Jul 2004 14:39:56 +0000 (+0000)
Subject: Bug 233486: Only process groups user is supposed to be able to bless in editgroups.cgi
X-Git-Tag: bugzilla-2.18rc1~9
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0066e681a05fb471d9468119e755a00e40dd19f5;p=thirdparty%2Fbugzilla.git
Bug 233486: Only process groups user is supposed to be able to bless in editgroups.cgi
r=justdave
a=justdave
---
diff --git a/editusers.cgi b/editusers.cgi
index 9dfc672d9b..ed8f974e27 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -155,7 +155,7 @@ sub EmitFormElements ($$$$)
print "
User is a member of these groups | \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();