Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14756815
D18907.id45323.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D18907.id45323.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D18907: When administrators revoke SSH keys, don't include a "security warning" in the mail
Attached
Detach File
Event Timeline
Log In to Comment