Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18614736
D10185.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
D10185.diff
View Options
diff --git a/src/applications/passphrase/storage/PassphraseCredential.php b/src/applications/passphrase/storage/PassphraseCredential.php
--- a/src/applications/passphrase/storage/PassphraseCredential.php
+++ b/src/applications/passphrase/storage/PassphraseCredential.php
@@ -1,7 +1,8 @@
<?php
final class PassphraseCredential extends PassphraseDAO
- implements PhabricatorPolicyInterface {
+ implements PhabricatorPolicyInterface,
+ PhabricatorDestructibleInterface {
protected $name;
protected $credentialType;
@@ -83,4 +84,19 @@
return null;
}
+/* -( PhabricatorDestructibleInterface )----------------------------------- */
+
+ public function destroyObjectPermanently(
+ PhabricatorDestructionEngine $engine) {
+
+ $this->openTransaction();
+ $secrets = id(new PassphraseSecret())->loadAllWhere(
+ 'id = %d',
+ $this->getSecretID());
+ foreach ($secrets as $secret) {
+ $secret->delete();
+ }
+ $this->delete();
+ $this->saveTransaction();
+ }
}
diff --git a/src/applications/system/interface/PhabricatorDestructibleInterface.php b/src/applications/system/interface/PhabricatorDestructibleInterface.php
--- a/src/applications/system/interface/PhabricatorDestructibleInterface.php
+++ b/src/applications/system/interface/PhabricatorDestructibleInterface.php
@@ -11,7 +11,7 @@
// TEMPLATE IMPLEMENTATION /////////////////////////////////////////////////////
-/* -( PhabricatorDestructableInterface )----------------------------------- */
+/* -( PhabricatorDestructibleInterface )----------------------------------- */
/*
public function destroyObjectPermanently(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sep 15 2025, 1:10 PM (21 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
9096401
Default Alt Text
D10185.diff (1 KB)
Attached To
Mode
D10185: T5409, allow bin/remove to permanently destroy credential and everything associated with it
Attached
Detach File
Event Timeline
Log In to Comment