]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 537887 - "The flag setter should be able to unset a flag even if not in the reque...
authorReed Loden <reed@reedloden.com>
Wed, 17 Feb 2010 22:00:52 +0000 (16:00 -0600)
committerReed Loden <reed@reedloden.com>
Wed, 17 Feb 2010 22:00:52 +0000 (16:00 -0600)
[r=LpSolit a=LpSolit]

Bugzilla/Flag.pm
template/en/default/flag/list.html.tmpl

index 4f042cb74d1aa5d49b38f3304d8d1ae9663b57b3..90944a2a8ce8ea9989d0d217943dc4fcaa176842 100644 (file)
@@ -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))
index c0bffd704d72f16a417ded866955e99f44ab78b3..1e8974a9f22d14450afe062b29b1e83cdcd3dd3a 100644 (file)
@@ -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 %]
       </td>
     [% END %]
   </tr>
-[% END %]
\ No newline at end of file
+[% END %]