summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Bug.pm5
-rw-r--r--extensions/BMO/Extension.pm24
-rw-r--r--extensions/BMO/lib/Data.pm16
-rw-r--r--extensions/BMO/lib/Reports/ProductSecurity.pm2
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-dev-engagement-event.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-legal.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-privacy-data.html.tmpl4
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-recoverykey.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/hook/bug/create/create-form.html.tmpl6
-rw-r--r--extensions/MozProjectReview/Extension.pm8
-rw-r--r--extensions/MozProjectReview/web/js/moz_project_review.js2
12 files changed, 51 insertions, 24 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 7dc2113e1..6a5e0966e 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -635,6 +635,9 @@ sub create {
my ($class, $params) = @_;
my $dbh = Bugzilla->dbh;
+ # BMO - allow parameter alteration before creation
+ Bugzilla::Hook::process('bug_before_create', { params => $params });
+
$dbh->bz_start_transaction();
# These fields have default values which we can use if they are undefined.
@@ -3684,7 +3687,7 @@ sub groups {
}
# BMO: if required, hack in groups exposed by -visible membership
- # (eg mozilla-corporation-confidential-visible), so reporters can add the
+ # (eg mozilla-employee-confidential-visible), so reporters can add the
# bug to a group on show_bug.
# if the bug is already in the group, the user will not be able to remove
# it unless they are a true group member.
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index 1e54dbfdf..c0e8b084b 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -1193,6 +1193,30 @@ sub enter_bug_start {
{
$cgi->param('product', 'Infrastructure & Operations');
}
+
+ # map renamed groups
+ $cgi->param('groups', _map_groups($cgi->param('groups')));
+}
+
+sub bug_before_create {
+ my ($self, $args) = @_;
+ my $params = $args->{params};
+ if (exists $params->{groups}) {
+ # map renamed groups
+ $params->{groups} = [ _map_groups($params->{groups}) ];
+ }
+}
+
+sub _map_groups {
+ my (@groups) = @_;
+ return unless @groups;
+ @groups = @{ $groups[0] } if ref($groups[0]);
+ return map {
+ # map mozilla-corporation-confidential => mozilla-employee-confidential
+ $_ eq 'mozilla-corporation-confidential'
+ ? 'mozilla-employee-confidential'
+ : $_
+ } @groups;
}
sub forced_format {
diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm
index 0b15925f0..ea8bffec7 100644
--- a/extensions/BMO/lib/Data.pm
+++ b/extensions/BMO/lib/Data.pm
@@ -133,7 +133,7 @@ our @always_fileable_groups = qw(
l20n-security
marketing-private
mozilla-confidential
- mozilla-corporation-confidential
+ mozilla-employee-confidential
mozilla-foundation-confidential
mozilla-engagement
mozilla-messaging-confidential
@@ -148,7 +148,7 @@ our @always_fileable_groups = qw(
# Mapping of products to their security bits
our %product_sec_groups = (
"addons.mozilla.org" => 'client-services-security',
- "Air Mozilla" => 'mozilla-corporation-confidential',
+ "Air Mozilla" => 'mozilla-employee-confidential',
"Android Background Services" => 'mozilla-services-security',
"Audio/Visual Infrastructure" => 'mozilla-corporation-confidential',
"AUS" => 'client-services-security',
@@ -160,29 +160,29 @@ our %product_sec_groups = (
"Developer Ecosystem" => 'client-services-security',
"Finance" => 'finance',
"Firefox Health Report" => 'mozilla-services-security',
- "Infrastructure & Operations" => 'mozilla-corporation-confidential',
+ "Infrastructure & Operations" => 'mozilla-employee-confidential',
"Input" => 'websites-security',
- "Internet Public Policy" => 'mozilla-corporation-confidential',
+ "Internet Public Policy" => 'mozilla-employee-confidential',
"L20n" => 'l20n-security',
"Legal" => 'legal',
"Marketing" => 'marketing-private',
"Marketplace" => 'client-services-security',
"Mozilla Communities" => 'mozilla-communities-security',
- "Mozilla Corporation" => 'mozilla-corporation-confidential',
+ "Mozilla Corporation" => 'mozilla-employee-confidential',
"Mozilla Developer Network" => 'websites-security',
"Mozilla Grants" => 'grants',
"mozillaignite" => 'websites-security',
"Mozilla Messaging" => 'mozilla-messaging-confidential',
"Mozilla Metrics" => 'metrics-private',
- "mozilla.org" => 'mozilla-corporation-confidential',
+ "mozilla.org" => 'mozilla-employee-confidential',
"Mozilla PR" => 'pr-private',
- "Mozilla QA" => 'mozilla-corporation-confidential',
+ "Mozilla QA" => 'mozilla-employee-confidential',
"Mozilla Reps" => 'mozilla-reps',
"Mozilla Services" => 'mozilla-services-security',
"Popcorn" => 'websites-security',
"Privacy" => 'privacy',
"quality.mozilla.org" => 'websites-security',
- "Release Engineering" => 'mozilla-corporation-confidential',
+ "Release Engineering" => 'mozilla-employee-confidential',
"Snippets" => 'websites-security',
"Socorro" => 'client-services-security',
"support.mozillamessaging.com" => 'websites-security',
diff --git a/extensions/BMO/lib/Reports/ProductSecurity.pm b/extensions/BMO/lib/Reports/ProductSecurity.pm
index 946ad10f0..2324e725a 100644
--- a/extensions/BMO/lib/Reports/ProductSecurity.pm
+++ b/extensions/BMO/lib/Reports/ProductSecurity.pm
@@ -22,7 +22,7 @@ sub report {
action => 'run',
object => 'product_security' });
- my $moco = Bugzilla::Group->new({ name => 'mozilla-corporation-confidential' })
+ my $moco = Bugzilla::Group->new({ name => 'mozilla-employee-confidential' })
or return;
my $products = [];
diff --git a/extensions/BMO/template/en/default/bug/create/create-dev-engagement-event.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-dev-engagement-event.html.tmpl
index b80d587b4..c3c81419b 100644
--- a/extensions/BMO/template/en/default/bug/create/create-dev-engagement-event.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-dev-engagement-event.html.tmpl
@@ -180,7 +180,7 @@
<input type="hidden" name="status_whiteboard" id="status_whiteboard" value="">
<input type="hidden" name="bug_file_loc" id="bug_file_loc" value="">
<input type="hidden" name="cf_due_date" id="cf_due_date" value="">
-<input type="hidden" name="groups" id="groups" value="mozilla-corporation-confidential">
+<input type="hidden" name="groups" id="groups" value="mozilla-employee-confidential">
<input type="hidden" name="token" value="[% token FILTER html %]">
<table id="bug_form">
diff --git a/extensions/BMO/template/en/default/bug/create/create-legal.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-legal.html.tmpl
index fdb92c11b..5abe79597 100644
--- a/extensions/BMO/template/en/default/bug/create/create-legal.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-legal.html.tmpl
@@ -28,7 +28,7 @@
yui = [ 'autocomplete' ]
%]
-[% IF user.in_group("mozilla-corporation-confidential")
+[% IF user.in_group("mozilla-employee-confidential")
OR user.in_group("mozilla-messaging-confidential")
OR user.in_group("mozilla-foundation-confidential") %]
diff --git a/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl
index fd8d3c655..104c96aa8 100644
--- a/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-presentation.html.tmpl
@@ -86,7 +86,7 @@ function trySubmit() {
<input type="hidden" name="bug_severity" id="bug_severity" value="normal">
<input type="hidden" name="comment" id="comment" value="">
<input type="hidden" name="short_desc" id="short_desc" value="">
- <input type="hidden" name="groups" value="mozilla-corporation-confidential">
+ <input type="hidden" name="groups" value="mozilla-employee-confidential">
<input type="hidden" name="token" value="[% token FILTER html %]">
<table>
diff --git a/extensions/BMO/template/en/default/bug/create/create-privacy-data.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-privacy-data.html.tmpl
index fbf3bed55..b99953282 100644
--- a/extensions/BMO/template/en/default/bug/create/create-privacy-data.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-privacy-data.html.tmpl
@@ -201,14 +201,14 @@ function trySubmit() {
var shortdesc = 'Event - (' + date + ' ' + time + ') - ' + location + ' - ' + topic;
document.getElementById('short_desc').value = shortdesc;
- // If intended audience is employees only, add mozilla-corporation-confidential group
+ // If intended audience is employees only, add mozilla-employee-confidential group
var audience = document.getElementById('audience').value;
if (audience == 'Employees Only') {
var brownbagRequestForm = document.getElementById('brownbagRequestForm');
var groups = document.createElement('input');
groups.type = 'hidden';
groups.name = 'groups';
- groups.value = 'mozilla-corporation-confidential';
+ groups.value = 'mozilla-employee-confidential';
brownbagRequestForm.appendChild(groups);
}
diff --git a/extensions/BMO/template/en/default/bug/create/create-recoverykey.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-recoverykey.html.tmpl
index a75959abb..ffe9b3482 100644
--- a/extensions/BMO/template/en/default/bug/create/create-recoverykey.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-recoverykey.html.tmpl
@@ -41,7 +41,7 @@
<input type="hidden" name="priority" value="--">
<input type="hidden" name="version" value="other">
<input type="hidden" name="bug_severity" value="normal">
- <input type="hidden" name="groups" value="mozilla-corporation-confidential">
+ <input type="hidden" name="groups" value="mozilla-employee-confidential">
<input type="hidden" name="groups" value="infra">
<input type="hidden" name="token" value="[% token FILTER html %]">
<input type="hidden" name="cc" value="tfairfield@mozilla.com, ghuerta@mozilla.com">
diff --git a/extensions/BMO/template/en/default/hook/bug/create/create-form.html.tmpl b/extensions/BMO/template/en/default/hook/bug/create/create-form.html.tmpl
index ed09886bc..562ebfbdd 100644
--- a/extensions/BMO/template/en/default/hook/bug/create/create-form.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug/create/create-form.html.tmpl
@@ -21,10 +21,10 @@
"the assignee, QA contact, and CC list only."
%]
[% END %]
- [% IF user.in_group('mozilla-corporation-confidential-visible')
- && !user.in_group('mozilla-corporation-confidential') %]
+ [% IF user.in_group('mozilla-employee-confidential-visible')
+ && !user.in_group('mozilla-employee-confidential') %]
[% PROCESS group_checkbox
- name = 'mozilla-corporation-confidential'
+ name = 'mozilla-employee-confidential'
desc = "Restrict the visibility of this " _ terms.bug _ " to " _
"Mozilla Employees and Contractors only."
%]
diff --git a/extensions/MozProjectReview/Extension.pm b/extensions/MozProjectReview/Extension.pm
index b43889135..49bbdaeca 100644
--- a/extensions/MozProjectReview/Extension.pm
+++ b/extensions/MozProjectReview/Extension.pm
@@ -100,7 +100,7 @@ sub post_bug_after_creation {
product => 'mozilla.org',
component => 'Security Assurance: Review Request',
bug_severity => 'normal',
- groups => [ 'mozilla-corporation-confidential' ],
+ groups => [ 'mozilla-employee-confidential' ],
op_sys => 'All',
rep_platform => 'All',
version => 'other',
@@ -168,7 +168,7 @@ sub post_bug_after_creation {
bug_severity => 'normal',
priority => '--',
keywords => 'privacy-review-needed',
- groups => [ 'mozilla-corporation-confidential' ],
+ groups => [ 'mozilla-employee-confidential' ],
op_sys => 'All',
rep_platform => 'All',
version => 'other',
@@ -185,7 +185,7 @@ sub post_bug_after_creation {
component => 'Product Review',
bug_severity => 'normal',
priority => '--',
- groups => [ 'mozilla-corporation-confidential' ],
+ groups => [ 'mozilla-employee-confidential' ],
op_sys => 'All',
rep_platform => 'All',
version => 'unspecified',
@@ -202,7 +202,7 @@ sub post_bug_after_creation {
component => 'Vendor Review',
bug_severity => 'normal',
priority => '--',
- groups => [ 'mozilla-corporation-confidential' ],
+ groups => [ 'mozilla-employee-confidential' ],
op_sys => 'All',
rep_platform => 'All',
version => 'unspecified',
diff --git a/extensions/MozProjectReview/web/js/moz_project_review.js b/extensions/MozProjectReview/web/js/moz_project_review.js
index 2dfbeb87f..22e79f707 100644
--- a/extensions/MozProjectReview/web/js/moz_project_review.js
+++ b/extensions/MozProjectReview/web/js/moz_project_review.js
@@ -248,7 +248,7 @@ var MPR = {
var groups = document.createElement('input');
groups.type = 'hidden';
groups.name = 'groups';
- groups.value = 'mozilla-corporation-confidential';
+ groups.value = 'mozilla-employee-confidential';
Dom.get('mozProjectForm').appendChild(groups);
}