summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgerv%gerv.net <>2003-02-16 20:59:43 +0100
committergerv%gerv.net <>2003-02-16 20:59:43 +0100
commit5a8548ce03181d006f133b349ff8ed6605bb09fa (patch)
treed21a0b28c21756ff45b30c9f7b86b5eae32296cc
parent550ffb9f7128ff8e4697bbc0dddd1aadb2c8c2d1 (diff)
downloadbugzilla-5a8548ce03181d006f133b349ff8ed6605bb09fa.tar.gz
bugzilla-5a8548ce03181d006f133b349ff8ed6605bb09fa.tar.xz
Bug 186994 - Unable to accept a new bug that has been assigned. Patch by gerv; r=bbaetz, a=justdave.
-rwxr-xr-xBug.pm8
-rwxr-xr-xBugzilla/Bug.pm8
-rwxr-xr-xprocess_bug.cgi12
3 files changed, 14 insertions, 14 deletions
diff --git a/Bug.pm b/Bug.pm
index dd91d6f3f..14876dbe3 100755
--- a/Bug.pm
+++ b/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/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index dd91d6f3f..14876dbe3 100755
--- a/Bugzilla/Bug.pm
+++ b/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/process_bug.cgi b/process_bug.cgi
index 642d5beb5..6f0d64175 100755
--- a/process_bug.cgi
+++ b/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";
}