-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into have-extension
- Loading branch information
Showing
28 changed files
with
47 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4227,7 +4227,7 @@ sub _migrate_group_owners { | |
my $dbh = Bugzilla->dbh; | ||
return if $dbh->bz_column_info('groups', 'owner_user_id'); | ||
$dbh->bz_add_column('groups', 'owner_user_id', {TYPE => 'INT3'}); | ||
my $nobody = Bugzilla::User->check('[email protected]'); | ||
my $nobody = Bugzilla::User->check(Bugzilla->localconfig->nobody_user); | ||
$dbh->do('UPDATE groups SET owner_user_id = ?', undef, $nobody->id); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,7 @@ use constant LOCALCONFIG_VARS => ( | |
{name => 'memcached_namespace', default => "bugzilla:",}, | ||
{name => 'urlbase', default => '',}, | ||
{name => 'canonical_urlbase', lazy => 1}, | ||
{name => 'nobody_user', default => '[email protected]'}, | ||
{name => 'attachment_base', default => '',}, | ||
{name => 'ses_username', default => '',}, | ||
{name => 'ses_password', default => '',}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -972,7 +972,8 @@ sub object_end_of_create { | |
# Add default searches to new user's footer | ||
my $dbh = Bugzilla->dbh; | ||
|
||
my $sharer = Bugzilla::User->new({name => '[email protected]'}) or return; | ||
my $sharer = Bugzilla::User->new({name => Bugzilla->localconfig->nobody_user}) | ||
or return; | ||
my $group = Bugzilla::Group->new({name => 'everyone'}) or return; | ||
|
||
foreach my $definition (@default_named_queries) { | ||
|
@@ -1012,7 +1013,7 @@ sub _bug_reporters_hw_os { | |
sub _bug_is_unassigned { | ||
my ($self) = @_; | ||
my $assignee = $self->assigned_to->login; | ||
return $assignee eq '[email protected]' || $assignee =~ /@(?!invalid).+\.bugs$/; | ||
return $assignee eq Bugzilla->localconfig->nobody_user || $assignee =~ /@(?!invalid).+\.bugs$/; | ||
} | ||
|
||
sub _bug_has_current_patch { | ||
|
@@ -1192,7 +1193,7 @@ sub object_start_of_update { | |
|
||
# and the assignee isn't a real person | ||
return | ||
unless $new_bug->assigned_to->login eq '[email protected]' | ||
unless $new_bug->assigned_to->login eq Bugzilla->localconfig->nobody_user | ||
|| $new_bug->assigned_to->login =~ /@(?!invalid).+\.bugs$/; | ||
|
||
# and the user can set the status to NEW | ||
|
@@ -1927,7 +1928,8 @@ sub _post_employee_incident_bug { | |
my ($investigate_bug, $ssh_key_bug); | ||
my $old_user = Bugzilla->user; | ||
eval { | ||
Bugzilla->set_user(Bugzilla::User->new({name => '[email protected]'})); | ||
Bugzilla->set_user(Bugzilla::User->new( | ||
{name => Bugzilla->localconfig->nobody_user})); | ||
my $new_user = Bugzilla->user; | ||
|
||
# HACK: User needs to be in the editbugs and primary bug's group to allow | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ | |
print "Press <Ctrl-C> to stop or <Enter> to continue...\n"; | ||
getc(); | ||
|
||
my $nobody = Bugzilla::User->check({name => '[email protected]'}); | ||
my $nobody = Bugzilla::User->check({name => Bugzilla->localconfig->nobody_user}); | ||
my $field = Bugzilla::Field->check({name => 'status_whiteboard'}); | ||
my $when = $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)'); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
use Bugzilla::Util qw(trim); | ||
|
||
my $dbh = Bugzilla->dbh; | ||
my $nobody = Bugzilla::User->check({name => '[email protected]'}); | ||
my $nobody = Bugzilla::User->check({name => Bugzilla->localconfig->nobody_user}); | ||
my $field = Bugzilla::Field->check({name => 'attachments.mimetype'}); | ||
|
||
# grab list of suitable attachments | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ | |
[% group.name FILTER html %]</span> | ||
</td> | ||
<td nowrap> | ||
[% IF group.owner.login == '[email protected]' %] | ||
[% IF group.owner.login == Bugzilla.localconfig.nobody_user %] | ||
– | ||
[% ELSE %] | ||
[% INCLUDE global/user.html.tmpl who = group.owner %] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
|
||
# these are used in a few places | ||
is_cced = bug.cc.contains(user.login); | ||
unassigned = (bug.assigned_to.login == "[email protected]") | ||
unassigned = (bug.assigned_to.login == Bugzilla.localconfig.nobody_user) | ||
|| (bug.assigned_to.login.search('@(?!invalid).+\.bugs$')); | ||
|
||
# custom fields that have custom rendering, or should not be rendered | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ use Bugzilla::Util qw(detaint_natural trim); | |
our $VERSION = '2'; | ||
|
||
use constant REQUIRE_WATCH_USER => 1; | ||
use constant DEFAULT_ASSIGNEE => '[email protected]'; | ||
|
||
use constant REL_COMPONENT_WATCHER => 15; | ||
|
||
|
@@ -100,7 +99,7 @@ sub template_before_create { | |
sub template_before_process { | ||
my ($self, $args) = @_; | ||
return unless $args->{file} eq 'admin/components/create.html.tmpl'; | ||
$args->{vars}{comp}{default_assignee}{login} = DEFAULT_ASSIGNEE; | ||
$args->{vars}{comp}{default_assignee}{login} = Bugzilla->localconfig->nobody_user; | ||
} | ||
|
||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,7 +129,7 @@ sub get_bug_role_phids { | |
} | ||
|
||
sub is_bug_assigned { | ||
return $_[0]->assigned_to->email ne '[email protected]'; | ||
return $_[0]->assigned_to->email ne Bugzilla->localconfig->nobody_user; | ||
} | ||
|
||
sub is_attachment_phab_revision { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
<>; | ||
|
||
# we need to be logged in to do user searching and update bugs | ||
my $nobody = Bugzilla::User->check({name => '[email protected]'}); | ||
my $nobody = Bugzilla::User->check({name => Bugzilla->localconfig->nobody_user}); | ||
$nobody->{groups} = [Bugzilla::Group->get_all]; | ||
Bugzilla->set_user($nobody); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,8 @@ sub suggestions { | |
# we always need to be authenticated to perform user matching | ||
my $user = Bugzilla->user; | ||
if (!$user->id) { | ||
Bugzilla->set_user(Bugzilla::User->check({name => '[email protected]'})); | ||
Bugzilla->set_user(Bugzilla::User->check( | ||
{name => Bugzilla->localconfig->nobody_user})); | ||
push @reviewers, @{$bug->mentors}; | ||
Bugzilla->set_user($user); | ||
} | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ BEGIN | |
|
||
Bugzilla->usage_mode(USAGE_MODE_CMDLINE); | ||
my $dbh = Bugzilla->dbh; | ||
my $user = Bugzilla::User->check({name => '[email protected]'}); | ||
my $user = Bugzilla::User->check({name => Bugzilla->localconfig->nobody_user}); | ||
|
||
my $tf_vis = $dbh->selectall_arrayref(<<SQL); | ||
SELECT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,7 +104,7 @@ BEGIN | |
|
||
# update bugs | ||
|
||
my $nobody = Bugzilla::User->check({name => '[email protected]'}); | ||
my $nobody = Bugzilla::User->check({name => Bugzilla->localconfig->nobody_user}); | ||
|
||
# put our nobody user into all groups to avoid permissions issues | ||
$nobody->{groups} = [Bugzilla::Group->get_all]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ BEGIN | |
components | ||
ON components.watch_user = profiles.userid | ||
WHERE | ||
profiles.login_name != '[email protected]' | ||
profiles.login_name != ? | ||
AND components.id IS NULL | ||
AND NOT profiles.login_name LIKE '%.bugs' | ||
AND NOT profiles.login_name LIKE '%.tld' | ||
|
@@ -77,14 +77,16 @@ BEGIN | |
profiles.userid | ||
EOF | ||
|
||
my $nobody = Bugzilla->localconfig->nobody_user; | ||
if ($dump_sql) { | ||
$sql =~ s/[?]/"$nobody"/; | ||
$sql =~ s/[?]/$date/g; | ||
print $sql; | ||
exit; | ||
} | ||
|
||
say STDERR "looking for users inactive since $date"; | ||
my $users = $dbh->selectall_arrayref($sql, {Slice => {}}, $date, $date); | ||
my $users = $dbh->selectall_arrayref($sql, {Slice => {}}, $nobody, $date, $date); | ||
my $total = scalar @$users; | ||
die "no matching users found.\n" unless $total; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
|
||
my $dbh = Bugzilla->dbh; | ||
my @remove_group_names; | ||
my $nobody_name = '[email protected]'; | ||
my $nobody_name = Bugzilla->localconfig->nobody_user; | ||
my $admin_name = '[email protected]'; | ||
|
||
GetOptions( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,7 +147,7 @@ | |
|
||
my @users = ( | ||
{ | ||
login => '[email protected]', | ||
login => Bugzilla->localconfig->nobody_user, | ||
realname => 'Nobody; OK to take it and work on it', | ||
password => '*' | ||
}, | ||
|
@@ -232,7 +232,7 @@ | |
name => 'General', | ||
description => 'For bugs in Firefox which do not fit into ' | ||
. 'other more specific Firefox components', | ||
initialowner => '[email protected]', | ||
initialowner => Bugzilla->localconfig->nobody_user, | ||
initialqaowner => '', | ||
initial_cc => [], | ||
watch_user => '[email protected]' | ||
|
@@ -251,7 +251,7 @@ | |
description => | ||
'This is the component for issues specific to bugzilla.mozilla.org ' | ||
. 'that do not belong in other components.', | ||
initialowner => '[email protected]', | ||
initialowner => Bugzilla->localconfig->nobody_user, | ||
initialqaowner => '', | ||
initial_cc => [], | ||
watch_user => '[email protected]' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,8 @@ | |
= $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 => '[email protected]', cache => 1}); | ||
my $nobody = Bugzilla::User->check( | ||
{name => Bugzilla->localconfig->nobody_user, cache => 1}); | ||
|
||
my $bug_count = @$bug_ids; | ||
if ($bug_count == 0) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
assignee => '', | ||
product => '', | ||
component => '', | ||
unassigned => '[email protected]', | ||
unassigned => Bugzilla->localconfig->nobody_user, | ||
|
||
# severities | ||
severity => 'major,critical,blocker', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ | |
$dbh->bz_commit_transaction(); | ||
|
||
# [email protected] cannot receive email | ||
next if $group->owner->login eq '[email protected]'; | ||
next if $group->owner->login eq Bugzilla->localconfig->nobody_user; | ||
|
||
_send_email($group, \@users_removed); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ sub usage { | |
} | ||
|
||
# We will need these for entering into bugs_activity | ||
my $who = Bugzilla::User->new({name => '[email protected]'}); | ||
my $who = Bugzilla::User->new({name => Bugzilla->localconfig->nobody_user}); | ||
my $field = Bugzilla::Field->new({name => $field_name}); | ||
|
||
my $product_id = $dbh->selectrow_array("SELECT id FROM products WHERE name = ?", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ my $bug_1 = Bugzilla::Bug->create({ | |
keywords => [], | ||
cc => [], | ||
comment => 'This is a brand new bug', | ||
assigned_to => '[email protected]', | ||
assigned_to => Bugzilla->localconfig->nobody_user, | ||
}); | ||
ok($bug_1->id, "got a new bug"); | ||
|
||
|
@@ -56,7 +56,7 @@ my $bug_2 = Bugzilla::Bug->create({ | |
keywords => [], | ||
cc => [], | ||
comment => "This is related to ${urlbase}show_bug.cgi?id=$bug_1_id", | ||
assigned_to => '[email protected]', | ||
assigned_to => Bugzilla->localconfig->nobody_user, | ||
}); | ||
|
||
my $bug_2_id = $bug_2->id; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,7 @@ | |
<td> | ||
<em>If you want to assign this [% terms.bug %] to yourself, | ||
check the box below.</em><br> | ||
[% IF bug.assigned_to.login == "[email protected]" || bug.assigned_to.login.search('@(?!invalid).+\.bugs$') %] | ||
[% IF bug.assigned_to.login == Bugzilla.localconfig.nobody_user || bug.assigned_to.login.search('@(?!invalid).+\.bugs$') %] | ||
[% take_if_patch = 1 %] | ||
[% END %] | ||
<input type="checkbox" id="takebug" name="takebug" value="1" [% IF take_if_patch %] data-take-if-patch="1" [% END %]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters