diff options
author | Reed Loden <reed@reedloden.com> | 2010-02-17 23:00:52 +0100 |
---|---|---|
committer | Reed Loden <reed@reedloden.com> | 2010-02-17 23:00:52 +0100 |
commit | d758e50afca7d94da0510c76eccbb81567315a82 (patch) | |
tree | 462b4dfee1733384b48d38785363f1c269aa3ae3 | |
parent | ed751860d5613bc1c8617377fd28be4ede04dd78 (diff) | |
download | bugzilla-d758e50afca7d94da0510c76eccbb81567315a82.tar.gz bugzilla-d758e50afca7d94da0510c76eccbb81567315a82.tar.xz |
Bug 537887 - "The flag setter should be able to unset a flag even if not in the request group"
[r=LpSolit a=LpSolit]
-rw-r--r-- | Bugzilla/Flag.pm | 2 | ||||
-rw-r--r-- | template/en/default/flag/list.html.tmpl | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 4f042cb74..90944a2a8 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 c0bffd704..1e8974a9f 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 %] <option value="X"></option> [% END %] [% IF type.is_active %] @@ -210,4 +210,4 @@ </td> [% END %] </tr> -[% END %]
\ No newline at end of file +[% END %] |