summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-07-31 11:27:23 +0200
committerbugreport%peshkin.net <>2004-07-31 11:27:23 +0200
commit4c1db37570469aef2c7cc9f2ad9f859560ca8851 (patch)
tree17a519e7f08a85993b710ecd6d809bd9e4b40211 /Bugzilla/Bug.pm
parent1ffd632931b05caea45f9c48079b455d156086be (diff)
downloadbugzilla-4c1db37570469aef2c7cc9f2ad9f859560ca8851.tar.gz
bugzilla-4c1db37570469aef2c7cc9f2ad9f859560ca8851.tar.xz
Bug 253588: Change Bugzilla->user to be usable even for a logged-out user
patch by erik,joel r=kiko a=justdave
Diffstat (limited to 'Bugzilla/Bug.pm')
-rwxr-xr-xBugzilla/Bug.pm6
1 files changed, 3 insertions, 3 deletions
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;