Commit 9ae8acb3 authored by Byron Jones's avatar Byron Jones

Bug 651786: Modifying the default user object modifies the DEFAULT_USER constant

r=sgreen, a=sgreen
parent 739b4fa3
......@@ -23,7 +23,6 @@ use Bugzilla::Group;
use DateTime::TimeZone;
use List::Util qw(max);
use Scalar::Util qw(blessed);
use Storable qw(dclone);
use URI;
use URI::QueryParam;
......@@ -118,7 +117,7 @@ sub new {
my $class = ref($invocant) || $invocant;
my ($param) = @_;
my $user = DEFAULT_USER;
my $user = { %{ DEFAULT_USER() } };
bless ($user, $class);
return $user unless $param;
......@@ -136,7 +135,7 @@ sub super_user {
my $class = ref($invocant) || $invocant;
my ($param) = @_;
my $user = dclone(DEFAULT_USER);
my $user = { %{ DEFAULT_USER() } };
$user->{groups} = [Bugzilla::Group->get_all];
$user->{bless_groups} = [Bugzilla::Group->get_all];
bless $user, $class;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment