Page MenuHomePhabricator

D10185.id24502.diff
No OneTemporary

D10185.id24502.diff

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

Mime Type
text/plain
Expires
Mar 24 2025, 2:25 AM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7708846
Default Alt Text
D10185.id24502.diff (1 KB)

Event Timeline