From fc2d539c324a34254a5cb5e9ebeb386c39220f93 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 4 Apr 2016 16:39:14 +0000 Subject: Bug 1257662 - Disallow clearing a flag if the flag is set to allow granting by specifc group and changer is not in group --- template/en/default/flag/list.html.tmpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'template/en/default/flag') diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl index 0d84e9bff..7993a2a89 100644 --- a/template/en/default/flag/list.html.tmpl +++ b/template/en/default/flag/list.html.tmpl @@ -133,11 +133,14 @@ class="flag_select flag_type-[% type.id %]" [% IF !can_edit_flag %] disabled="disabled"[% END %]> [%# Only display statuses the user is allowed to set. %] - [% IF !flag || (can_edit_flag && user.can_request_flag(type)) || flag.setter_id == user.id %] + [% IF !flag + || (can_edit_flag && user.can_unset_flag(type, flag.status) && user.can_request_flag(type)) + || flag.setter_id == user.id %] [% END %] [% IF type.is_active && can_edit_flag %] - [% IF (type.is_requestable && user.can_request_flag(type)) || (flag && flag.status == "?") %] + [% IF (!flag && type.is_requestable && user.can_request_flag(type)) + || (flag && user.can_unset_flag(type, flag.status) && flag.status == "?") %] [% END %] [% IF user.can_set_flag(type) || (flag && flag.status == "+") %] -- cgit v1.2.3-24-g4f1b