Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14703802
D10791.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D10791.diff
View Options
diff --git a/resources/sql/autopatches/20141105.ssh.1.rename.sql b/resources/sql/autopatches/20141105.ssh.1.rename.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20141105.ssh.1.rename.sql
@@ -0,0 +1 @@
+RENAME TABLE {$NAMESPACE}_user.user_sshkey TO {$NAMESPACE}_auth.auth_sshkey;
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
@@ -1317,6 +1317,7 @@
'PhabricatorAuthProviderConfigTransactionQuery' => 'applications/auth/query/PhabricatorAuthProviderConfigTransactionQuery.php',
'PhabricatorAuthRegisterController' => 'applications/auth/controller/PhabricatorAuthRegisterController.php',
'PhabricatorAuthRevokeTokenController' => 'applications/auth/controller/PhabricatorAuthRevokeTokenController.php',
+ 'PhabricatorAuthSSHKey' => 'applications/auth/storage/PhabricatorAuthSSHKey.php',
'PhabricatorAuthSSHKeyQuery' => 'applications/auth/query/PhabricatorAuthSSHKeyQuery.php',
'PhabricatorAuthSSHPublicKey' => 'applications/auth/storage/PhabricatorAuthSSHPublicKey.php',
'PhabricatorAuthSession' => 'applications/auth/storage/PhabricatorAuthSession.php',
@@ -2488,7 +2489,6 @@
'PhabricatorUserProfileEditor' => 'applications/people/editor/PhabricatorUserProfileEditor.php',
'PhabricatorUserRealNameField' => 'applications/people/customfield/PhabricatorUserRealNameField.php',
'PhabricatorUserRolesField' => 'applications/people/customfield/PhabricatorUserRolesField.php',
- 'PhabricatorUserSSHKey' => 'applications/settings/storage/PhabricatorUserSSHKey.php',
'PhabricatorUserSchemaSpec' => 'applications/people/storage/PhabricatorUserSchemaSpec.php',
'PhabricatorUserSearchIndexer' => 'applications/people/search/PhabricatorUserSearchIndexer.php',
'PhabricatorUserSinceField' => 'applications/people/customfield/PhabricatorUserSinceField.php',
@@ -4383,6 +4383,10 @@
'PhabricatorAuthProviderConfigTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
'PhabricatorAuthRegisterController' => 'PhabricatorAuthController',
'PhabricatorAuthRevokeTokenController' => 'PhabricatorAuthController',
+ 'PhabricatorAuthSSHKey' => array(
+ 'PhabricatorAuthDAO',
+ 'PhabricatorPolicyInterface',
+ ),
'PhabricatorAuthSSHKeyQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorAuthSSHPublicKey' => 'Phobject',
'PhabricatorAuthSession' => array(
@@ -5631,10 +5635,6 @@
'PhabricatorUserProfileEditor' => 'PhabricatorApplicationTransactionEditor',
'PhabricatorUserRealNameField' => 'PhabricatorUserCustomField',
'PhabricatorUserRolesField' => 'PhabricatorUserCustomField',
- 'PhabricatorUserSSHKey' => array(
- 'PhabricatorUserDAO',
- 'PhabricatorPolicyInterface',
- ),
'PhabricatorUserSchemaSpec' => 'PhabricatorConfigSchemaSpec',
'PhabricatorUserSearchIndexer' => 'PhabricatorSearchDocumentIndexer',
'PhabricatorUserSinceField' => 'PhabricatorUserCustomField',
diff --git a/src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php b/src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php
--- a/src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php
+++ b/src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php
@@ -24,7 +24,7 @@
}
protected function loadPage() {
- $table = new PhabricatorUserSSHKey();
+ $table = new PhabricatorAuthSSHKey();
$conn_r = $table->establishConnection('r');
$data = queryfx_all(
diff --git a/src/applications/settings/storage/PhabricatorUserSSHKey.php b/src/applications/auth/storage/PhabricatorAuthSSHKey.php
rename from src/applications/settings/storage/PhabricatorUserSSHKey.php
rename to src/applications/auth/storage/PhabricatorAuthSSHKey.php
--- a/src/applications/settings/storage/PhabricatorUserSSHKey.php
+++ b/src/applications/auth/storage/PhabricatorAuthSSHKey.php
@@ -1,7 +1,7 @@
<?php
-final class PhabricatorUserSSHKey
- extends PhabricatorUserDAO
+final class PhabricatorAuthSSHKey
+ extends PhabricatorAuthDAO
implements PhabricatorPolicyInterface {
protected $userPHID;
diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php
--- a/src/applications/people/storage/PhabricatorUser.php
+++ b/src/applications/people/storage/PhabricatorUser.php
@@ -896,7 +896,7 @@
$profile->delete();
}
- $keys = id(new PhabricatorUserSSHKey())->loadAllWhere(
+ $keys = id(new PhabricatorAuthSSHKey())->loadAllWhere(
'userPHID = %s',
$this->getPHID());
foreach ($keys as $key) {
diff --git a/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php b/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
--- a/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
+++ b/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
@@ -59,7 +59,7 @@
return new Aphront404Response();
}
} else {
- $key = new PhabricatorUserSSHKey();
+ $key = new PhabricatorAuthSSHKey();
$key->setUserPHID($user->getPHID());
}
@@ -251,7 +251,7 @@
private function processDelete(
AphrontRequest $request,
- PhabricatorUserSSHKey $key) {
+ PhabricatorAuthSSHKey $key) {
$viewer = $request->getUser();
$user = $this->getUser();
@@ -308,7 +308,7 @@
$type = $public_key->getType();
$body = $public_key->getBody();
- $key = id(new PhabricatorUserSSHKey())
+ $key = id(new PhabricatorAuthSSHKey())
->setUserPHID($user->getPHID())
->setName('id_rsa_phabricator')
->setKeyType($type)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 16, 9:26 PM (21 h, 6 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6997464
Default Alt Text
D10791.diff (5 KB)
Attached To
Mode
D10791: Move SSHKey table to Auth database
Attached
Detach File
Event Timeline
Log In to Comment