From 0e11b4a741c9104db967a2c51fa77b071cb087f5 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Wed, 14 Oct 2015 15:53:48 +0000 Subject: Bug 1195952 - Please add the following choices to the CAB review drop down area of bugzilla --- extensions/BMO/Extension.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'extensions/BMO/Extension.pm') diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 6938eb790..16caecc9a 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -549,8 +549,18 @@ sub bug_check_can_change_field { my $user = Bugzilla->user; if ($field =~ /^cf/ && !@$priv_results && $new_value ne '---') { + # Cannot use the standard %cf_setter mapping as we want anyone + # to be able to set ?, just not the other values. + if ($field eq 'cf_cab_review') { + if ($new_value ne '1' + && $new_value ne '?' + && !$user->in_group('infra', $bug->product_id)) + { + push (@$priv_results, PRIVILEGES_REQUIRED_EMPOWERED); + } + } # "other" custom field setters restrictions - if (exists $cf_setters->{$field}) { + elsif (exists $cf_setters->{$field}) { my $in_group = 0; foreach my $group (@{$cf_setters->{$field}}) { if ($user->in_group($group, $bug->product_id)) { -- cgit v1.2.3-24-g4f1b