]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 186994 - Unable to accept a new bug that has been assigned. Patch by gerv; r...
authorgerv%gerv.net <>
Sun, 16 Feb 2003 19:59:43 +0000 (19:59 +0000)
committergerv%gerv.net <>
Sun, 16 Feb 2003 19:59:43 +0000 (19:59 +0000)
Bug.pm
Bugzilla/Bug.pm
process_bug.cgi

diff --git a/Bug.pm b/Bug.pm
index dd91d6f3f211652a46736281e492a39fe8b0676e..14876dbe3a384e2094ef523e80a3472ca6c63b2c 100755 (executable)
--- 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'};
 }
index dd91d6f3f211652a46736281e492a39fe8b0676e..14876dbe3a384e2094ef523e80a3472ca6c63b2c 100755 (executable)
@@ -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'};
 }
index 642d5beb57a37918ff0b57b3ec1df8d0c5125488..6f0d641750a0206b0410922d62ba8b1509d43767 100755 (executable)
@@ -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";
     }