Differential D18894 Diff 45338 src/applications/auth/xaction/PhabricatorAuthPasswordRevokeTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/xaction/PhabricatorAuthPasswordRevokeTransaction.php
- This file was added.
<?php | |||||
final class PhabricatorAuthPasswordRevokeTransaction | |||||
extends PhabricatorAuthPasswordTransactionType { | |||||
const TRANSACTIONTYPE = 'password.revoke'; | |||||
public function generateOldValue($object) { | |||||
return (bool)$object->getIsRevoked(); | |||||
} | |||||
public function generateNewValue($object, $value) { | |||||
return (bool)$value; | |||||
} | |||||
public function applyInternalEffects($object, $value) { | |||||
$object->setIsRevoked((int)$value); | |||||
} | |||||
public function getTitle() { | |||||
if ($this->getNewValue()) { | |||||
return pht( | |||||
'%s revoked this password.', | |||||
$this->renderAuthor()); | |||||
} else { | |||||
return pht( | |||||
'%s removed this password from the revocation list.', | |||||
$this->renderAuthor()); | |||||
amckinley: "reactivated"? | |||||
Not Done Inline Actions"reinstated" is a little odd as the opposite of "revoked" but I wanted to avoid "reactivated" which is directly the opposite of "deactivated", which we use in other applications. This string isn't currently reachable anyway since nothing can unrevoke passwords. I'll just update this to an explicit "removed this password from the revocation list" or something in that vein. epriestley: "reinstated" is a little odd as the opposite of "revoked" but I wanted to avoid "reactivated"… | |||||
} | |||||
} | |||||
} |
"reactivated"?