summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/Extension.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-10-14 17:53:48 +0200
committerDavid Lawrence <dkl@mozilla.com>2015-10-14 17:53:56 +0200
commit0e11b4a741c9104db967a2c51fa77b071cb087f5 (patch)
tree27605728dab566604a46ef740e87d487dda79567 /extensions/BMO/Extension.pm
parent9c792196e7f940dacda41424ed25a02bb4c0b633 (diff)
downloadbugzilla-0e11b4a741c9104db967a2c51fa77b071cb087f5.tar.gz
bugzilla-0e11b4a741c9104db967a2c51fa77b071cb087f5.tar.xz
Bug 1195952 - Please add the following choices to the CAB review drop down area of bugzilla
Diffstat (limited to 'extensions/BMO/Extension.pm')
-rw-r--r--extensions/BMO/Extension.pm12
1 files changed, 11 insertions, 1 deletions
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)) {