Commit d758e50a authored by Reed Loden's avatar Reed Loden

Bug 537887 - "The flag setter should be able to unset a flag even if not in the request group"

[r=LpSolit a=LpSolit]
parent ed751860
...@@ -731,10 +731,12 @@ sub _check_setter { ...@@ -731,10 +731,12 @@ sub _check_setter {
# Make sure the user is authorized to modify flags, see bug 180879: # Make sure the user is authorized to modify flags, see bug 180879:
# - The flag exists and is unchanged. # - The flag exists and is unchanged.
# - The flag setter can unset flag.
# - Users in the request_group can clear pending requests and set flags # - Users in the request_group can clear pending requests and set flags
# and can rerequest set flags. # and can rerequest set flags.
# - Users in the grant_group can set/clear flags, including "+" and "-". # - Users in the grant_group can set/clear flags, including "+" and "-".
unless (($status eq $self->{_old_status}) unless (($status eq $self->{_old_status})
|| ($status eq 'X' && $setter->id == Bugzilla->user->id)
|| (($status eq 'X' || $status eq '?') || (($status eq 'X' || $status eq '?')
&& $setter->can_request_flag($self->type)) && $setter->can_request_flag($self->type))
|| $setter->can_set_flag($self->type)) || $setter->can_set_flag($self->type))
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
onchange="toggleRequesteeField(this);" onchange="toggleRequesteeField(this);"
class="flag_select"> class="flag_select">
[%# Only display statuses the user is allowed to set. %] [%# 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> <option value="X"></option>
[% END %] [% END %]
[% IF type.is_active %] [% IF type.is_active %]
...@@ -210,4 +210,4 @@ ...@@ -210,4 +210,4 @@
</td> </td>
[% END %] [% END %]
</tr> </tr>
[% END %] [% END %]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment