diff options
author | lpsolit%gmail.com <> | 2009-07-07 11:11:24 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2009-07-07 11:11:24 +0000 |
commit | d3ba2d4611394a107b0c84f04ec2389a11832059 (patch) | |
tree | 3c1fa76fd8d8470136108a895ded0350aa1d2a9a | |
parent | Bug 500900: Confirming bugs requires NEW state to exist - Patch by FrédÃÂ... (diff) | |
download | bugzilla-d3ba2d4611394a107b0c84f04ec2389a11832059.tar.gz bugzilla-d3ba2d4611394a107b0c84f04ec2389a11832059.tar.bz2 bugzilla-d3ba2d4611394a107b0c84f04ec2389a11832059.zip |
Bug 502682: CheckIfVotedConfirmed fails to confirm a bug if you don't have the permissions to set status/everconfirmed - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
-rw-r--r-- | Bugzilla/Bug.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 3ede4732c..b3ddd2634 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3160,11 +3160,17 @@ sub CheckIfVotedConfirmed { } ThrowCodeError('no_open_bug_status') unless $new_status; - $bug->set_status($new_status); + # We cannot call $bug->set_status() here, because a user without + # canconfirm privs should still be able to confirm a bug by + # popular vote. We already know the new status is valid, so it's safe. + $bug->{bug_status} = $new_status; + $bug->{everconfirmed} = 1; + delete $bug->{'status'}; # Contains the status object. } else { # If the bug is in a closed state, only set everconfirmed to 1. - $bug->_set_everconfirmed(1); + # Do not call $bug->_set_everconfirmed(), for the same reason as above. + $bug->{everconfirmed} = 1; } $bug->update(); |