diff options
author | bugreport%peshkin.net <> | 2004-07-31 09:27:23 +0000 |
---|---|---|
committer | bugreport%peshkin.net <> | 2004-07-31 09:27:23 +0000 |
commit | 4c1db37570469aef2c7cc9f2ad9f859560ca8851 (patch) | |
tree | 17a519e7f08a85993b710ecd6d809bd9e4b40211 /Bugzilla/Bug.pm | |
parent | 1ffd632931b05caea45f9c48079b455d156086be (diff) | |
download | bugs-4c1db37570469aef2c7cc9f2ad9f859560ca8851.tar bugs-4c1db37570469aef2c7cc9f2ad9f859560ca8851.tar.gz bugs-4c1db37570469aef2c7cc9f2ad9f859560ca8851.tar.bz2 bugs-4c1db37570469aef2c7cc9f2ad9f859560ca8851.tar.xz bugs-4c1db37570469aef2c7cc9f2ad9f859560ca8851.zip |
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-x | Bugzilla/Bug.pm | 6 |
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; |