From: Reed Loden Date: Wed, 17 Feb 2010 22:02:10 +0000 (-0600) Subject: Bug 537887 - "The flag setter should be able to unset a flag even if not in the reque... X-Git-Tag: bugzilla-3.6rc1~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db1c92369fab3b5b613cecc610b51775b08b05ff;p=thirdparty%2Fbugzilla.git Bug 537887 - "The flag setter should be able to unset a flag even if not in the request group" [r=LpSolit a=LpSolit] --- diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index d33b14d316..44045a7436 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -731,10 +731,12 @@ sub _check_setter { # Make sure the user is authorized to modify flags, see bug 180879: # - The flag exists and is unchanged. + # - The flag setter can unset flag. # - Users in the request_group can clear pending requests and set flags # and can rerequest set flags. # - Users in the grant_group can set/clear flags, including "+" and "-". unless (($status eq $self->{_old_status}) + || ($status eq 'X' && $setter->id == Bugzilla->user->id) || (($status eq 'X' || $status eq '?') && $setter->can_request_flag($self->type)) || $setter->can_set_flag($self->type)) diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl index c0bffd704d..1e8974a9f2 100644 --- a/template/en/default/flag/list.html.tmpl +++ b/template/en/default/flag/list.html.tmpl @@ -66,7 +66,7 @@ onchange="toggleRequesteeField(this);" class="flag_select"> [%# Only display statuses the user is allowed to set. %] - [% IF user.can_request_flag(type) %] + [% IF user.can_request_flag(type) || flag.setter_id == user.id %] [% END %] [% IF type.is_active %] @@ -210,4 +210,4 @@ [% END %] -[% END %] \ No newline at end of file +[% END %]