summaryrefslogtreecommitdiffstats
path: root/scripts
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 /scripts
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 'scripts')
-rwxr-xr-xscripts/eject-users-from-groups.pl2
-rwxr-xr-xscripts/generate_bmo_data.pl6
-rwxr-xr-xscripts/move_os.pl2
-rwxr-xr-xscripts/movebugs.pl6
-rwxr-xr-xscripts/nagios_blocker_checker.pl2
-rwxr-xr-xscripts/remove_idle_group_members.pl2
-rwxr-xr-xscripts/reset_default_user.pl2
7 files changed, 12 insertions, 10 deletions
diff --git a/scripts/eject-users-from-groups.pl b/scripts/eject-users-from-groups.pl
index 52e2bbbf3..4b27be83d 100755
--- a/scripts/eject-users-from-groups.pl
+++ b/scripts/eject-users-from-groups.pl
@@ -23,7 +23,7 @@ Bugzilla->usage_mode(USAGE_MODE_CMDLINE);
my $dbh = Bugzilla->dbh;
my @remove_group_names;
-my $nobody_name = 'nobody@mozilla.org';
+my $nobody_name = Bugzilla->params->{'nobody_user'};
my $admin_name = 'automation@bmo.tld';
GetOptions(
diff --git a/scripts/generate_bmo_data.pl b/scripts/generate_bmo_data.pl
index 6356762c8..8a9f72d17 100755
--- a/scripts/generate_bmo_data.pl
+++ b/scripts/generate_bmo_data.pl
@@ -158,7 +158,7 @@ $group->update();
my @users = (
{
- login => 'nobody@mozilla.org',
+ login => Bugzilla->params->{'nobody_user'},
realname => 'Nobody; OK to take it and work on it',
password => '*'
},
@@ -267,7 +267,7 @@ my @products = (
name => 'General',
description => 'For bugs in Firefox which do not fit into ' .
'other more specific Firefox components',
- initialowner => 'nobody@mozilla.org',
+ initialowner => Bugzilla->params->{'nobody_user'},
initialqaowner => '',
initial_cc => [],
watch_user => 'general@firefox.bugs'
@@ -287,7 +287,7 @@ my @products = (
name => 'General',
description => 'This is the component for issues specific to bugzilla.mozilla.org '
. 'that do not belong in other components.',
- initialowner => 'nobody@mozilla.org',
+ initialowner => Bugzilla->params->{'nobody_user'},
initialqaowner => '',
initial_cc => [],
watch_user => 'general@bugzilla.bugs'
diff --git a/scripts/move_os.pl b/scripts/move_os.pl
index 546b47c7e..963188261 100755
--- a/scripts/move_os.pl
+++ b/scripts/move_os.pl
@@ -40,7 +40,7 @@ my $dbh = Bugzilla->dbh;
my $timestamp = $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
my $bug_ids = $dbh->selectcol_arrayref(q{SELECT bug_id FROM bugs WHERE bugs.op_sys = ?}, undef, $from_os);
my $field = Bugzilla::Field->check({ name => 'op_sys', cache => 1 });
-my $nobody = Bugzilla::User->check({ name => 'nobody@mozilla.org', cache => 1 });
+my $nobody = Bugzilla::User->check({ name => Bugzilla->params->{'nobody_user'}, cache => 1 });
my $bug_count = @$bug_ids;
if ($bug_count == 0) {
diff --git a/scripts/movebugs.pl b/scripts/movebugs.pl
index 2c643cdfb..55a43d943 100755
--- a/scripts/movebugs.pl
+++ b/scripts/movebugs.pl
@@ -73,10 +73,12 @@ my $component_field_id = $dbh->selectrow_array(
$component_field_id
or die "Can't find field ID for 'component' field\n";
+my $nobody = Bugzilla->params->{'nobody_user'};
my $user_id = $dbh->selectrow_array(
- "SELECT userid FROM profiles WHERE login_name='nobody\@mozilla.org'");
+ "SELECT userid FROM profiles WHERE login_name=?",
+ undef, $nobody);
$user_id
- or die "Can't find user ID for 'nobody\@mozilla.org'\n";
+ or die "Can't find user ID for '$nobody'\n";
$dbh->bz_start_transaction();
diff --git a/scripts/nagios_blocker_checker.pl b/scripts/nagios_blocker_checker.pl
index 0a9ec96b6..8c4277507 100755
--- a/scripts/nagios_blocker_checker.pl
+++ b/scripts/nagios_blocker_checker.pl
@@ -28,7 +28,7 @@ my $config = {
assignee => '',
product => '',
component => '',
- unassigned => 'nobody@mozilla.org',
+ unassigned => Bugzilla->params->{'nobody_user'},
# severities
severity => 'major,critical,blocker',
# time in hours to wait before paging/warning
diff --git a/scripts/remove_idle_group_members.pl b/scripts/remove_idle_group_members.pl
index 74e8658ff..e4ef88bc1 100755
--- a/scripts/remove_idle_group_members.pl
+++ b/scripts/remove_idle_group_members.pl
@@ -78,7 +78,7 @@ foreach my $group_id (keys %remove_data) {
$dbh->bz_commit_transaction();
# nobody@mozilla.org cannot recieve email
- next if $group->owner->login eq 'nobody@mozilla.org';
+ next if $group->owner->login eq Bugzilla->params->{'nobody_user'};
_send_email($group, \@users_removed);
}
diff --git a/scripts/reset_default_user.pl b/scripts/reset_default_user.pl
index d0d2534f2..942afda17 100755
--- a/scripts/reset_default_user.pl
+++ b/scripts/reset_default_user.pl
@@ -52,7 +52,7 @@ if (!$product || $help
}
# We will need these for entering into bugs_activity
-my $who = Bugzilla::User->new({ name => 'nobody@mozilla.org' });
+my $who = Bugzilla::User->new({ name => Bugzilla->params->{'nobody_user'} });
my $field = Bugzilla::Field->new({ name => $field_name });
trick_taint($product);