From: lpsolit%gmail.com <> Date: Wed, 20 Apr 2005 01:11:41 +0000 (+0000) Subject: Bug 288603: Allow users in the request group to remove pending requests made by other... X-Git-Tag: bugzilla-2.19.3~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f4fba5980af8a0670aa402eb046fc58a06cb1b8;p=thirdparty%2Fbugzilla.git Bug 288603: Allow users in the request group to remove pending requests made by others - Patch by Frédéric Buclin r=myk a=justdave --- diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 29215876ab..de9c3d23b8 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 "-"