Differential D19861 Diff 47440 src/applications/people/xaction/PhabricatorUserDisableTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/xaction/PhabricatorUserDisableTransaction.php
| Show All 29 Lines | if ($new) { | ||||
| $this->renderAuthor()); | $this->renderAuthor()); | ||||
| } else { | } else { | ||||
| return pht( | return pht( | ||||
| '%s enabled this user.', | '%s enabled this user.', | ||||
| $this->renderAuthor()); | $this->renderAuthor()); | ||||
| } | } | ||||
| } | } | ||||
| public function getTitleForFeed() { | public function shouldHideForFeed() { | ||||
| $new = $this->getNewValue(); | // Don't publish feed stories about disabling users, since this can be | ||||
| if ($new) { | // a sensitive action. | ||||
| return pht( | return true; | ||||
| '%s disabled %s.', | |||||
| $this->renderAuthor(), | |||||
| $this->renderObject()); | |||||
| } else { | |||||
| return pht( | |||||
| '%s enabled %s.', | |||||
| $this->renderAuthor(), | |||||
| $this->renderObject()); | |||||
| } | |||||
| } | } | ||||
| public function validateTransactions($object, array $xactions) { | public function validateTransactions($object, array $xactions) { | ||||
| $errors = array(); | $errors = array(); | ||||
| foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
| $is_disabled = (bool)$object->getIsDisabled(); | $is_disabled = (bool)$object->getIsDisabled(); | ||||
| Show All 28 Lines | |||||