mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-17 01:08:41 +01:00
Disallow "Accept" on drafts, allow "Resign"
Summary: Depends on D18801. Ref T2543. See PHI229. I missed "Accept" before, but intended to disallow it (like "Reject") since I don't want drafts to be reviewable. However, "Resign" seems fine to allow? So let's allow that for now. Test Plan: Was no longer offered "Accept" on draft revisions. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T2543 Differential Revision: https://secure.phabricator.com/D18802
This commit is contained in:
parent
54f131dc4b
commit
1b76250f89
2 changed files with 5 additions and 5 deletions
|
@ -162,6 +162,11 @@ final class DifferentialRevisionAcceptTransaction
|
|||
'closed. Only open revisions can be accepted.'));
|
||||
}
|
||||
|
||||
if ($object->isDraft()) {
|
||||
throw new Exception(
|
||||
pht('You can not accept a draft revision.'));
|
||||
}
|
||||
|
||||
$config_key = 'differential.allow-self-accept';
|
||||
if (!PhabricatorEnv::getEnvConfig($config_key)) {
|
||||
if ($this->isViewerRevisionAuthor($object, $viewer)) {
|
||||
|
|
|
@ -64,11 +64,6 @@ final class DifferentialRevisionResignTransaction
|
|||
'been closed. You can only resign from open revisions.'));
|
||||
}
|
||||
|
||||
if ($object->isDraft()) {
|
||||
throw new Exception(
|
||||
pht('You can not resign from a draft revision.'));
|
||||
}
|
||||
|
||||
$resigned = DifferentialReviewerStatus::STATUS_RESIGNED;
|
||||
if ($this->getViewerReviewerStatus($object, $viewer) == $resigned) {
|
||||
throw new Exception(
|
||||
|
|
Loading…
Add table
Reference in a new issue