From 4c1db37570469aef2c7cc9f2ad9f859560ca8851 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Sat, 31 Jul 2004 09:27:23 +0000 Subject: Bug 253588: Change Bugzilla->user to be usable even for a logged-out user patch by erik,joel r=kiko a=justdave --- Bugzilla/Bug.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Bug.pm') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 53b8bd193..8c0998217 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -390,7 +390,7 @@ sub user { use Bugzilla; my @movers = map { trim $_ } split(",", Param("movers")); - my $canmove = Param("move-enabled") && Bugzilla->user && + my $canmove = Param("move-enabled") && Bugzilla->user->id && (lsearch(\@movers, Bugzilla->user->login) != -1); # In the below, if the person hasn't logged in, then we treat them @@ -399,12 +399,12 @@ sub user { # Display everything as if they have all the permissions in the # world; their permissions will get checked when they log in and # actually try to make the change. - my $privileged = (!Bugzilla->user) + my $privileged = (!Bugzilla->user->id) || Bugzilla->user->in_group("editbugs") || Bugzilla->user->id == $self->{'assigned_to'}{'id'} || (Param('useqacontact') && $self->{'qa_contact'} && Bugzilla->user->id == $self->{'qa_contact'}{'id'}); - my $isreporter = Bugzilla->user && + my $isreporter = Bugzilla->user->id && Bugzilla->user->id == $self->{'reporter'}{'id'}; my $canedit = $privileged || $isreporter; -- cgit v1.2.3-24-g4f1b