summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/template
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-04-04 18:39:14 +0200
committerDavid Lawrence <dkl@mozilla.com>2016-04-04 18:39:14 +0200
commitfc2d539c324a34254a5cb5e9ebeb386c39220f93 (patch)
treeefbb2930e4b5ae0a348e180c771f3f8ab392006c /extensions/BugModal/template
parentc83c4f78bb91c27e2ffd0e5fb8091fe6795885b8 (diff)
downloadbugzilla-fc2d539c324a34254a5cb5e9ebeb386c39220f93.tar.gz
bugzilla-fc2d539c324a34254a5cb5e9ebeb386c39220f93.tar.xz
Bug 1257662 - Disallow clearing a flag if the flag is set to allow granting by specifc group and changer is not in group
Diffstat (limited to 'extensions/BugModal/template')
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl8
1 files changed, 5 insertions, 3 deletions
diff --git a/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl
index 3e0da1173..d4c2d50b3 100644
--- a/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl
@@ -127,15 +127,17 @@
<input type="hidden" id="[% flag_id FILTER html %]-dirty">
<select id="[% flag_id FILTER html %]" name="[% flag_id FILTER html %]"
title="[% t.description FILTER html %]"
- [% UNLESS (t.is_requestable && user.can_request_flag(t)) || user.can_set_flag(t) %]
+ [% UNLESS (t.is_requestable && user.can_request_flag(t))
+ || user.can_set_flag(t)
+ || (f && user.can_unset_flag(t, f.status)) %]
disabled
[% END %]
class="bug-flag">
- [% IF !f || (user.can_request_flag(t)) || f.setter_id == user.id %]
+ [% IF !f || (user.can_unset_flag(t, f.status) && user.can_request_flag(t)) || f.setter_id == user.id %]
<option value="X"></option>
[% END %]
[% IF t.is_active %]
- [% IF (t.is_requestable && user.can_request_flag(t)) || (f && f.status == "?") %]
+ [% IF (!f && t.is_requestable && user.can_request_flag(t)) || (f && user.can_unset_flag(t, f.status) && f.status == "?") %]
<option value="?" [% "selected" IF f && f.status == "?" %]>?</option>
[% END %]
[% IF user.can_set_flag(t) || (f && f.status == "+") %]