Differential D17108 Diff 41167 src/applications/differential/xaction/DifferentialRevisionAbandonTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionAbandonTransaction.php
| Show All 39 Lines | protected function validateAction($object, PhabricatorUser $viewer) { | ||||
| $config_key = 'differential.always-allow-abandon'; | $config_key = 'differential.always-allow-abandon'; | ||||
| if (!PhabricatorEnv::getEnvConfig($config_key)) { | if (!PhabricatorEnv::getEnvConfig($config_key)) { | ||||
| if (!$this->isViewerRevisionAuthor($object, $viewer)) { | if (!$this->isViewerRevisionAuthor($object, $viewer)) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'You can not abandon this revision because you are not the '. | 'You can not abandon this revision because you are not the '. | ||||
| 'author. You can only abandon revisions you own. You can change '. | 'author. You can only abandon revisions you own. You can change '. | ||||
| 'this behavior by adjusting the "%s" setting in Config', | 'this behavior by adjusting the "%s" setting in Config.', | ||||
| $config_key)); | $config_key)); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| public function getTitle() { | public function getTitle() { | ||||
| return pht( | return pht( | ||||
| '%s abandoned this revision.', | '%s abandoned this revision.', | ||||
| Show All 11 Lines | |||||