From 5e8fa24f5f1ca84f1ea6c37b05c94fe2836ece99 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" Date: Sun, 16 Feb 2003 11:59:44 +0000 Subject: [PATCH] Bug 186994 - Unable to accept a new bug that has been assigned. Patch by gerv; r=bbaetz, a=justdave. git-svn-id: svn://10.0.0.236/trunk@137864 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/Bug.pm | 8 +++++--- mozilla/webtools/bugzilla/Bugzilla/Bug.pm | 8 +++++--- mozilla/webtools/bugzilla/process_bug.cgi | 12 ++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mozilla/webtools/bugzilla/Bug.pm b/mozilla/webtools/bugzilla/Bug.pm index dd91d6f3f21..14876dbe3a3 100755 --- a/mozilla/webtools/bugzilla/Bug.pm +++ b/mozilla/webtools/bugzilla/Bug.pm @@ -379,9 +379,11 @@ sub user { || ($self->{'qa_contact'} && $::userid == $self->{'qa_contact'}{'id'}) || $::userid == $self->{'assigned_to'}{'id'} || &::UserInGroup("editbugs"); - $self->{'user'}->{'canconfirm'} = ($::userid == 0) - || &::UserInGroup("canconfirm") - || &::UserInGroup("editbugs"); + $self->{'user'}->{'canconfirm'} = $::userid == 0 + || ($self->{'qa_contact'} && $::userid == $self->{'qa_contact'}{'id'}) + || $::userid == $self->{'assigned_to'}{'id'} + || &::UserInGroup("editbugs") + || &::UserInGroup("canconfirm"); return $self->{'user'}; } diff --git a/mozilla/webtools/bugzilla/Bugzilla/Bug.pm b/mozilla/webtools/bugzilla/Bugzilla/Bug.pm index dd91d6f3f21..14876dbe3a3 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Bug.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Bug.pm @@ -379,9 +379,11 @@ sub user { || ($self->{'qa_contact'} && $::userid == $self->{'qa_contact'}{'id'}) || $::userid == $self->{'assigned_to'}{'id'} || &::UserInGroup("editbugs"); - $self->{'user'}->{'canconfirm'} = ($::userid == 0) - || &::UserInGroup("canconfirm") - || &::UserInGroup("editbugs"); + $self->{'user'}->{'canconfirm'} = $::userid == 0 + || ($self->{'qa_contact'} && $::userid == $self->{'qa_contact'}{'id'}) + || $::userid == $self->{'assigned_to'}{'id'} + || &::UserInGroup("editbugs") + || &::UserInGroup("canconfirm"); return $self->{'user'}; } diff --git a/mozilla/webtools/bugzilla/process_bug.cgi b/mozilla/webtools/bugzilla/process_bug.cgi index 642d5beb57a..6f0d641750a 100755 --- a/mozilla/webtools/bugzilla/process_bug.cgi +++ b/mozilla/webtools/bugzilla/process_bug.cgi @@ -310,7 +310,9 @@ my $qacontactid; ################################################################################ # CheckCanChangeField() defines what users are allowed to change what bugs. You # can add code here for site-specific policy changes, according to the -# instructions given in the Bugzilla Guide and below. +# instructions given in the Bugzilla Guide and below. Note that you may also +# have to update the Bug::user() function to give people access to the options +# that they are permitted to change. # # CheckCanChangeField() should return true if the user is allowed to change this # field, and false if they are not. @@ -527,13 +529,7 @@ sub DoComma { } sub DoConfirm { - if ($UserInEditGroupSet < 0) { - $UserInEditGroupSet = UserInGroup("editbugs"); - } - if ($UserInCanConfirmGroupSet < 0) { - $UserInCanConfirmGroupSet = UserInGroup("canconfirm"); - } - if ($UserInEditGroupSet || $UserInCanConfirmGroupSet) { + if (CheckCanChangeField("canconfirm", $::FORM{'id'}, 0, 1)) { DoComma(); $::query .= "everconfirmed = 1"; }