@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Move SSHKey table to Auth database

Summary: Ref T5833. Since these will no longer be bound specifically to users, bring them to a more central location.

Test Plan:
- Edited SSH keys.
- Ran `bin/ssh-auth` and `bin/ssh-auth-key`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5833

Differential Revision: https://secure.phabricator.com/D10791

+13 -12
+1
resources/sql/autopatches/20141105.ssh.1.rename.sql
··· 1 + RENAME TABLE {$NAMESPACE}_user.user_sshkey TO {$NAMESPACE}_auth.auth_sshkey;
+5 -5
src/__phutil_library_map__.php
··· 1317 1317 'PhabricatorAuthProviderConfigTransactionQuery' => 'applications/auth/query/PhabricatorAuthProviderConfigTransactionQuery.php', 1318 1318 'PhabricatorAuthRegisterController' => 'applications/auth/controller/PhabricatorAuthRegisterController.php', 1319 1319 'PhabricatorAuthRevokeTokenController' => 'applications/auth/controller/PhabricatorAuthRevokeTokenController.php', 1320 + 'PhabricatorAuthSSHKey' => 'applications/auth/storage/PhabricatorAuthSSHKey.php', 1320 1321 'PhabricatorAuthSSHKeyQuery' => 'applications/auth/query/PhabricatorAuthSSHKeyQuery.php', 1321 1322 'PhabricatorAuthSSHPublicKey' => 'applications/auth/storage/PhabricatorAuthSSHPublicKey.php', 1322 1323 'PhabricatorAuthSession' => 'applications/auth/storage/PhabricatorAuthSession.php', ··· 2488 2489 'PhabricatorUserProfileEditor' => 'applications/people/editor/PhabricatorUserProfileEditor.php', 2489 2490 'PhabricatorUserRealNameField' => 'applications/people/customfield/PhabricatorUserRealNameField.php', 2490 2491 'PhabricatorUserRolesField' => 'applications/people/customfield/PhabricatorUserRolesField.php', 2491 - 'PhabricatorUserSSHKey' => 'applications/settings/storage/PhabricatorUserSSHKey.php', 2492 2492 'PhabricatorUserSchemaSpec' => 'applications/people/storage/PhabricatorUserSchemaSpec.php', 2493 2493 'PhabricatorUserSearchIndexer' => 'applications/people/search/PhabricatorUserSearchIndexer.php', 2494 2494 'PhabricatorUserSinceField' => 'applications/people/customfield/PhabricatorUserSinceField.php', ··· 4383 4383 'PhabricatorAuthProviderConfigTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 4384 4384 'PhabricatorAuthRegisterController' => 'PhabricatorAuthController', 4385 4385 'PhabricatorAuthRevokeTokenController' => 'PhabricatorAuthController', 4386 + 'PhabricatorAuthSSHKey' => array( 4387 + 'PhabricatorAuthDAO', 4388 + 'PhabricatorPolicyInterface', 4389 + ), 4386 4390 'PhabricatorAuthSSHKeyQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 4387 4391 'PhabricatorAuthSSHPublicKey' => 'Phobject', 4388 4392 'PhabricatorAuthSession' => array( ··· 5631 5635 'PhabricatorUserProfileEditor' => 'PhabricatorApplicationTransactionEditor', 5632 5636 'PhabricatorUserRealNameField' => 'PhabricatorUserCustomField', 5633 5637 'PhabricatorUserRolesField' => 'PhabricatorUserCustomField', 5634 - 'PhabricatorUserSSHKey' => array( 5635 - 'PhabricatorUserDAO', 5636 - 'PhabricatorPolicyInterface', 5637 - ), 5638 5638 'PhabricatorUserSchemaSpec' => 'PhabricatorConfigSchemaSpec', 5639 5639 'PhabricatorUserSearchIndexer' => 'PhabricatorSearchDocumentIndexer', 5640 5640 'PhabricatorUserSinceField' => 'PhabricatorUserCustomField',
+1 -1
src/applications/auth/query/PhabricatorAuthSSHKeyQuery.php
··· 24 24 } 25 25 26 26 protected function loadPage() { 27 - $table = new PhabricatorUserSSHKey(); 27 + $table = new PhabricatorAuthSSHKey(); 28 28 $conn_r = $table->establishConnection('r'); 29 29 30 30 $data = queryfx_all(
+1 -1
src/applications/people/storage/PhabricatorUser.php
··· 896 896 $profile->delete(); 897 897 } 898 898 899 - $keys = id(new PhabricatorUserSSHKey())->loadAllWhere( 899 + $keys = id(new PhabricatorAuthSSHKey())->loadAllWhere( 900 900 'userPHID = %s', 901 901 $this->getPHID()); 902 902 foreach ($keys as $key) {
+3 -3
src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
··· 59 59 return new Aphront404Response(); 60 60 } 61 61 } else { 62 - $key = new PhabricatorUserSSHKey(); 62 + $key = new PhabricatorAuthSSHKey(); 63 63 $key->setUserPHID($user->getPHID()); 64 64 } 65 65 ··· 251 251 252 252 private function processDelete( 253 253 AphrontRequest $request, 254 - PhabricatorUserSSHKey $key) { 254 + PhabricatorAuthSSHKey $key) { 255 255 256 256 $viewer = $request->getUser(); 257 257 $user = $this->getUser(); ··· 308 308 $type = $public_key->getType(); 309 309 $body = $public_key->getBody(); 310 310 311 - $key = id(new PhabricatorUserSSHKey()) 311 + $key = id(new PhabricatorAuthSSHKey()) 312 312 ->setUserPHID($user->getPHID()) 313 313 ->setName('id_rsa_phabricator') 314 314 ->setKeyType($type)
+2 -2
src/applications/settings/storage/PhabricatorUserSSHKey.php src/applications/auth/storage/PhabricatorAuthSSHKey.php
··· 1 1 <?php 2 2 3 - final class PhabricatorUserSSHKey 4 - extends PhabricatorUserDAO 3 + final class PhabricatorAuthSSHKey 4 + extends PhabricatorAuthDAO 5 5 implements PhabricatorPolicyInterface { 6 6 7 7 protected $userPHID;