Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15398828
D15096.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D15096.diff
View Options
diff --git a/src/applications/passphrase/storage/PassphraseCredentialTransaction.php b/src/applications/passphrase/storage/PassphraseCredentialTransaction.php
--- a/src/applications/passphrase/storage/PassphraseCredentialTransaction.php
+++ b/src/applications/passphrase/storage/PassphraseCredentialTransaction.php
@@ -26,6 +26,7 @@
public function shouldHide() {
$old = $this->getOldValue();
+ $new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_DESCRIPTION:
return ($old === null);
@@ -35,6 +36,12 @@
return !strlen($old);
case self::TYPE_LOOKEDATSECRET:
return false;
+ case self::TYPE_DESTROY:
+ // Don't show "undestroy" transactions because they're a bit confusing
+ // and redundant with restoring a secret.
+ if (!$new) {
+ return true;
+ }
}
return parent::shouldHide();
}
@@ -77,12 +84,18 @@
}
break;
case self::TYPE_SECRET_ID:
- return pht(
- '%s updated the secret for this credential.',
- $this->renderHandleLink($author_phid));
+ if ($old === null) {
+ return pht(
+ '%s attached a new secret to this credential.',
+ $this->renderHandleLink($author_phid));
+ } else {
+ return pht(
+ '%s updated the secret for this credential.',
+ $this->renderHandleLink($author_phid));
+ }
case self::TYPE_DESTROY:
return pht(
- '%s destroyed this credential.',
+ '%s destroyed the secret for this credential.',
$this->renderHandleLink($author_phid));
case self::TYPE_LOOKEDATSECRET:
return pht(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 1:49 AM (6 d, 19 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7385753
Default Alt Text
D15096.diff (1 KB)
Attached To
Mode
D15096: Fix text for Passphrase credential destruction transaction when restoring credentials
Attached
Detach File
Event Timeline
Log In to Comment