Page MenuHomePhabricator

D18907.id45323.diff
No OneTemporary

D18907.id45323.diff

diff --git a/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php b/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php
--- a/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php
+++ b/src/applications/auth/editor/PhabricatorAuthSSHKeyEditor.php
@@ -3,6 +3,17 @@
final class PhabricatorAuthSSHKeyEditor
extends PhabricatorApplicationTransactionEditor {
+ private $isAdministrativeEdit;
+
+ public function setIsAdministrativeEdit($is_administrative_edit) {
+ $this->isAdministrativeEdit = $is_administrative_edit;
+ return $this;
+ }
+
+ public function getIsAdministrativeEdit() {
+ return $this->isAdministrativeEdit;
+ }
+
public function getEditorApplicationClass() {
return 'PhabricatorAuthApplication';
}
@@ -239,11 +250,13 @@
$body = parent::buildMailBody($object, $xactions);
- $body->addTextSection(
- pht('SECURITY WARNING'),
- pht(
- 'If you do not recognize this change, it may indicate your account '.
- 'has been compromised.'));
+ if (!$this->getIsAdministrativeEdit()) {
+ $body->addTextSection(
+ pht('SECURITY WARNING'),
+ pht(
+ 'If you do not recognize this change, it may indicate your account '.
+ 'has been compromised.'));
+ }
$detail_uri = $object->getURI();
$detail_uri = PhabricatorEnv::getProductionURI($detail_uri);
@@ -253,4 +266,17 @@
return $body;
}
+
+ protected function getCustomWorkerState() {
+ return array(
+ 'isAdministrativeEdit' => $this->isAdministrativeEdit,
+ );
+ }
+
+ protected function loadCustomWorkerState(array $state) {
+ $this->isAdministrativeEdit = idx($state, 'isAdministrativeEdit');
+ return $this;
+ }
+
+
}
diff --git a/src/applications/auth/revoker/PhabricatorAuthSSHRevoker.php b/src/applications/auth/revoker/PhabricatorAuthSSHRevoker.php
--- a/src/applications/auth/revoker/PhabricatorAuthSSHRevoker.php
+++ b/src/applications/auth/revoker/PhabricatorAuthSSHRevoker.php
@@ -43,6 +43,7 @@
->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true)
->setContentSource($content_source)
+ ->setIsAdministrativeEdit(true)
->applyTransactions($ssh_key, $xactions);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 22, 8:34 PM (5 h, 32 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7031315
Default Alt Text
D18907.id45323.diff (2 KB)

Event Timeline