summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Flag.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index 29215876a..de9c3d23b 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -320,8 +320,11 @@ sub validate {
# - The flag is unchanged
next if ($status eq $flag->{status});
- # - User can clear flags set by itself
- next if (($status eq "X") && ($user->id eq $flag->{setter}->id));
+ # - User in the $request_gid group can clear pending requests
+ next if ($status eq 'X'
+ && $flag->{status} eq '?'
+ && (!$flag->{type}->{request_gid}
+ || $user->in_group(&::GroupIdToName($flag->{type}->{request_gid}))));
# - User in the $grant_gid group can set/clear flags,
# including "+" and "-"