summaryrefslogtreecommitdiffstats
path: root/extensions/BMO
diff options
context:
space:
mode:
authorVladimir Panteleev <github.private@thecybershadow.net>2018-03-18 06:00:50 +0100
committerDylan William Hardison <dylan@hardison.net>2018-03-18 06:00:50 +0100
commit759243934df6a3a1d4bcfacc58ce842206923731 (patch)
tree759dc4f1b24c6f33c30f1ee787a99acde54df213 /extensions/BMO
parent38c94eb24d045f086e257c095113ad39ce603e65 (diff)
downloadbugzilla-759243934df6a3a1d4bcfacc58ce842206923731.tar.gz
bugzilla-759243934df6a3a1d4bcfacc58ce842206923731.tar.xz
Bug 1446236 - Allow customizing the name of the "nobody" user (nobody@mozilla.org)
Diffstat (limited to 'extensions/BMO')
-rw-r--r--extensions/BMO/Extension.pm10
-rwxr-xr-xextensions/BMO/bin/bug_1093952.pl2
-rwxr-xr-xextensions/BMO/bin/bug_1141452.pl2
-rwxr-xr-xextensions/BMO/bin/migrate-github-pull-requests.pl2
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-poweredby.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/pages/group_admins.html.tmpl2
7 files changed, 11 insertions, 11 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index 58d4b02cd..f23ab723f 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -879,7 +879,7 @@ sub object_end_of_create {
# Add default searches to new user's footer
my $dbh = Bugzilla->dbh;
- my $sharer = Bugzilla::User->new({ name => 'nobody@mozilla.org' })
+ my $sharer = Bugzilla::User->new({ name => Bugzilla->params->{'nobody_user'} })
or return;
my $group = Bugzilla::Group->new({ name => 'everyone' })
or return;
@@ -920,7 +920,7 @@ sub _bug_reporters_hw_os {
sub _bug_is_unassigned {
my ($self) = @_;
my $assignee = $self->assigned_to->login;
- return $assignee eq 'nobody@mozilla.org' || $assignee =~ /\.bugs$/;
+ return $assignee eq Bugzilla->params->{'nobody_user'} || $assignee =~ /\.bugs$/;
}
sub _bug_has_current_patch {
@@ -1101,7 +1101,7 @@ sub object_start_of_update {
# and the assignee isn't a real person
return unless
- $new_bug->assigned_to->login eq 'nobody@mozilla.org'
+ $new_bug->assigned_to->login eq Bugzilla->params->{'nobody_user'}
|| $new_bug->assigned_to->login =~ /\.bugs$/;
# and the user can set the status to NEW
@@ -1596,7 +1596,7 @@ sub field_end_of_create {
my $name = $field->name;
if (Bugzilla->usage_mode == USAGE_MODE_CMDLINE) {
- Bugzilla->set_user(Bugzilla::User->check({ name => 'nobody@mozilla.org' }));
+ Bugzilla->set_user(Bugzilla::User->check({ name => Bugzilla->params->{'nobody_user'} }));
print "Creating IT permission grant bug for new field '$name'...";
}
@@ -1974,7 +1974,7 @@ sub _post_employee_incident_bug {
my ($investigate_bug, $ssh_key_bug);
my $old_user = Bugzilla->user;
eval {
- Bugzilla->set_user(Bugzilla::User->new({ name => 'nobody@mozilla.org' }));
+ Bugzilla->set_user(Bugzilla::User->new({ name => Bugzilla->params->{'nobody_user'} }));
my $new_user = Bugzilla->user;
# HACK: User needs to be in the editbugs and primary bug's group to allow
diff --git a/extensions/BMO/bin/bug_1093952.pl b/extensions/BMO/bin/bug_1093952.pl
index 735c6a37a..fd891f4ae 100755
--- a/extensions/BMO/bin/bug_1093952.pl
+++ b/extensions/BMO/bin/bug_1093952.pl
@@ -52,7 +52,7 @@ printf "About to fix %s bugs\n", scalar(@$bugs);
print "Press <Ctrl-C> to stop or <Enter> to continue...\n";
getc();
-my $nobody = Bugzilla::User->check({ name => 'nobody@mozilla.org' });
+my $nobody = Bugzilla::User->check({ name => Bugzilla->params->{'nobody_user'} });
my $field = Bugzilla::Field->check({ name => 'status_whiteboard' });
my $when = $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
diff --git a/extensions/BMO/bin/bug_1141452.pl b/extensions/BMO/bin/bug_1141452.pl
index 869593802..155c4704c 100755
--- a/extensions/BMO/bin/bug_1141452.pl
+++ b/extensions/BMO/bin/bug_1141452.pl
@@ -50,7 +50,7 @@ printf "About to fix %s bugs\n", scalar(@$flags);
print "Press <Ctrl-C> to stop or <Enter> to continue...\n";
getc();
-my $nobody = Bugzilla::User->check({ name => 'nobody@mozilla.org' });
+my $nobody = Bugzilla::User->check({ name => Bugzilla->params->{'nobody_user'} });
my $when = $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
$dbh->bz_start_transaction();
diff --git a/extensions/BMO/bin/migrate-github-pull-requests.pl b/extensions/BMO/bin/migrate-github-pull-requests.pl
index 53c1727b5..c39778a4a 100755
--- a/extensions/BMO/bin/migrate-github-pull-requests.pl
+++ b/extensions/BMO/bin/migrate-github-pull-requests.pl
@@ -23,7 +23,7 @@ use Bugzilla::User;
use Bugzilla::Util qw(trim);
my $dbh = Bugzilla->dbh;
-my $nobody = Bugzilla::User->check({ name => 'nobody@mozilla.org' });
+my $nobody = Bugzilla::User->check({ name => Bugzilla->params->{'nobody_user'} });
my $field = Bugzilla::Field->check({ name => 'attachments.mimetype' });
# grab list of suitable attachments
diff --git a/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl
index 697542ead..a3862ab20 100644
--- a/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl
@@ -297,7 +297,7 @@ function validate_form() {
<input type="hidden" name="version" value="unspecified">
<input type="hidden" name="bug_severity" value="normal">
<input type="hidden" name="group" value="pr-private">
-<input type="hidden" name="assigned_to" id="assigned_to" value="nobody@mozilla.org">
+<input type="hidden" name="assigned_to" id="assigned_to" value="[% Bugzilla.params.nobody_user %]">
<input type="hidden" name="token" value="[% token FILTER html %]">
<div class="head">
diff --git a/extensions/BMO/template/en/default/bug/create/create-poweredby.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-poweredby.html.tmpl
index d6243c73b..2b7be5c75 100644
--- a/extensions/BMO/template/en/default/bug/create/create-poweredby.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-poweredby.html.tmpl
@@ -43,7 +43,7 @@ please provide some information about your application or product.</p>
<input type="hidden" name="priority" value="--">
<input type="hidden" name="op_sys" value="Other">
<input type="hidden" name="version" value="unspecified">
- <input type="hidden" name="assigned_to" value="nobody@mozilla.org">
+ <input type="hidden" name="assigned_to" value="[% Bugzilla.params.nobody_user %]">
<input type="hidden" name="cc" value="liz@mozilla.com">
<input type="hidden" name="groups" value="marketing-private">
<input type="hidden" name="token" value="[% token FILTER html %]">
diff --git a/extensions/BMO/template/en/default/pages/group_admins.html.tmpl b/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
index cfa3bd3ea..737b070de 100644
--- a/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
@@ -39,7 +39,7 @@
[% group.name FILTER html %]</span>
</td>
<td nowrap>
- [% IF group.owner.login == 'nobody@mozilla.org' %]
+ [% IF group.owner.login == Bugzilla.params.nobody_user %]
&ndash;
[% ELSE %]
[% INCLUDE global/user.html.tmpl who = group.owner %]