From: myk%mozilla.org <> Date: Fri, 22 Apr 2005 09:17:14 +0000 (+0000) Subject: Fix for bug 291391: allows users to rerequest set flags even if they don't have the... X-Git-Tag: bugzilla-2.19.3~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f6e1616c3e2f66d1982809a8d399129911d242b;p=thirdparty%2Fbugzilla.git Fix for bug 291391: allows users to rerequest set flags even if they don't have the privilege to set them; r=lpsolit; a=myk --- diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index de9c3d23b8..8e03284d05 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -320,9 +320,9 @@ sub validate { # - The flag is unchanged next if ($status eq $flag->{status}); - # - User in the $request_gid group can clear pending requests - next if ($status eq 'X' - && $flag->{status} eq '?' + # - User in the $request_gid group can clear pending requests and set flags + # and can rerequest set flags. + next if (($status eq 'X' || $status eq '?') && (!$flag->{type}->{request_gid} || $user->in_group(&::GroupIdToName($flag->{type}->{request_gid})))); diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index f5bb9703ba..98cd7418ba 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -442,12 +442,10 @@ [% title = "Flag Modification Denied" %] You tried to [% IF status == "+" %] grant [% ELSIF status == "-" %] deny [% ELSIF status == "X" %] clear [% ELSE %] request [% END %] - [% name FILTER html %] - [% IF status == "?" && old_status != "X" %], but this flag is already - set[% END %]. - Only a sufficiently empowered user [% IF status == "X" %] or the user who - set [% name FILTER html %][% old_status FILTER html %] in - the first place [% END %] can make this change. + [% name FILTER html %] + [% IF status == "X" %][% old_status FILTER html %][% END %]. + + Only a sufficiently empowered user can make this change. [% ELSIF error == "format_not_found" %] [% title = "Format Not Found" %]