Page MenuHomePhabricator

D9725.diff
No OneTemporary

D9725.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1089,6 +1089,7 @@
'PassphraseDAO' => 'applications/passphrase/storage/PassphraseDAO.php',
'PassphrasePHIDTypeCredential' => 'applications/passphrase/phid/PassphrasePHIDTypeCredential.php',
'PassphrasePasswordKey' => 'applications/passphrase/keys/PassphrasePasswordKey.php',
+ 'PassphraseRemarkupRule' => 'applications/passphrase/remarkup/PassphraseRemarkupRule.php',
'PassphraseSSHKey' => 'applications/passphrase/keys/PassphraseSSHKey.php',
'PassphraseSecret' => 'applications/passphrase/storage/PassphraseSecret.php',
'PasteCapabilityDefaultView' => 'applications/paste/capability/PasteCapabilityDefaultView.php',
@@ -3868,6 +3869,7 @@
'PassphraseDAO' => 'PhabricatorLiskDAO',
'PassphrasePHIDTypeCredential' => 'PhabricatorPHIDType',
'PassphrasePasswordKey' => 'PassphraseAbstractKey',
+ 'PassphraseRemarkupRule' => 'PhabricatorRemarkupRuleObject',
'PassphraseSSHKey' => 'PassphraseAbstractKey',
'PassphraseSecret' => 'PassphraseDAO',
'PasteCapabilityDefaultView' => 'PhabricatorPolicyCapability',
diff --git a/src/applications/passphrase/application/PhabricatorApplicationPassphrase.php b/src/applications/passphrase/application/PhabricatorApplicationPassphrase.php
--- a/src/applications/passphrase/application/PhabricatorApplicationPassphrase.php
+++ b/src/applications/passphrase/application/PhabricatorApplicationPassphrase.php
@@ -45,4 +45,10 @@
));
}
+ public function getRemarkupRules() {
+ return array(
+ new PassphraseRemarkupRule(),
+ );
+ }
+
}
diff --git a/src/applications/passphrase/remarkup/PassphraseRemarkupRule.php b/src/applications/passphrase/remarkup/PassphraseRemarkupRule.php
new file mode 100644
--- /dev/null
+++ b/src/applications/passphrase/remarkup/PassphraseRemarkupRule.php
@@ -0,0 +1,19 @@
+<?php
+
+final class PassphraseRemarkupRule
+ extends PhabricatorRemarkupRuleObject {
+
+ protected function getObjectNamePrefix() {
+ return 'K';
+ }
+
+ protected function loadObjects(array $ids) {
+ $viewer = $this->getEngine()->getConfig('viewer');
+
+ return id(new PassphraseCredentialQuery())
+ ->setViewer($viewer)
+ ->withIDs($ids)
+ ->execute();
+
+ }
+}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 5:59 PM (12 h, 41 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6919275
Default Alt Text
D9725.diff (2 KB)

Event Timeline