Differential D19398 Diff 46405 src/applications/differential/xaction/DifferentialRevisionRejectTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionRejectTransaction.php
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | protected function validateAction($object, PhabricatorUser $viewer) { | ||||
| if ($this->isViewerRevisionAuthor($object, $viewer)) { | if ($this->isViewerRevisionAuthor($object, $viewer)) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'You can not request changes to this revision because you are the '. | 'You can not request changes to this revision because you are the '. | ||||
| 'revision author. You can only request changes to revisions you do '. | 'revision author. You can only request changes to revisions you do '. | ||||
| 'not own.')); | 'not own.')); | ||||
| } | } | ||||
| if ($object->isDraft()) { | if ($object->isDraft() || !$object->getShouldBroadcast()) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht('You can not request changes to a draft revision.')); | pht('You can not request changes to a draft revision.')); | ||||
| } | } | ||||
| if ($this->isViewerFullyRejected($object, $viewer)) { | if ($this->isViewerFullyRejected($object, $viewer)) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'You can not request changes to this revision because you have '. | 'You can not request changes to this revision because you have '. | ||||
| Show All 18 Lines | |||||