From fe43c2dcdfc844fce2c699887cf1ddae53c24b4b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 9 Sep 2005 06:40:08 +0000 Subject: Bug 256135: Parameter 'movers' is handled differently in Bug.pm and buglist.cgi - Patch by Frédéric Buclin r/a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Bug.pm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'Bugzilla/Bug.pm') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 3a80f4095..b9206b9a0 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -599,9 +599,8 @@ sub user { return $self->{'user'} if exists $self->{'user'}; return {} if $self->{'error'}; - my @movers = map { trim $_ } split(",", Param("movers")); - my $canmove = Param("move-enabled") && Bugzilla->user->id && - (lsearch(\@movers, Bugzilla->user->login) != -1); + my $user = Bugzilla->user; + my $canmove = Param('move-enabled') && $user->is_mover; # In the below, if the person hasn't logged in, then we treat them # as if they can do anything. That's because we don't know why they @@ -609,17 +608,17 @@ 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 $unknown_privileges = !Bugzilla->user->id - || Bugzilla->user->in_group("editbugs"); + my $unknown_privileges = !$user->id + || $user->in_group("editbugs"); my $canedit = $unknown_privileges - || Bugzilla->user->id == $self->{assigned_to_id} + || $user->id == $self->{assigned_to_id} || (Param('useqacontact') && $self->{'qa_contact_id'} - && Bugzilla->user->id == $self->{qa_contact_id}); + && $user->id == $self->{qa_contact_id}); my $canconfirm = $unknown_privileges - || Bugzilla->user->in_group("canconfirm"); - my $isreporter = Bugzilla->user->id - && Bugzilla->user->id == $self->{reporter_id}; + || $user->in_group("canconfirm"); + my $isreporter = $user->id + && $user->id == $self->{reporter_id}; $self->{'user'} = {canmove => $canmove, canconfirm => $canconfirm, -- cgit v1.2.3-24-g4f1b