From 5a9df1a225265a8fb213e557479b79ee3da75723 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Wed, 4 Feb 2015 15:47:48 -0800 Subject: [PATCH] Policy - filter app engines where the user can't see the application from panel editing Summary: Fixes T7118. This does the basic "filter the list" thing, though it ends up being a little manual since I guess this hasn't come up before? There is also potential weird behavior if the user was using an app and lost access to it - they will have nothing selected on edit - but I think this is actually correct behavior in this circumstance. Test Plan: used a user who couldn't get access to the "quick create" apps and noted that the dropdown list on dashboard panel create was missing the expected engines ran `arc unit --everything` to verify abstract method implemented everywhere Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7118 Differential Revision: https://secure.phabricator.com/D11687 --- .../almanac/query/AlmanacDeviceSearchEngine.php | 2 +- .../almanac/query/AlmanacNetworkSearchEngine.php | 2 +- .../almanac/query/AlmanacServiceSearchEngine.php | 2 +- .../audit/query/PhabricatorCommitSearchEngine.php | 4 ++++ .../query/PhabricatorCalendarEventSearchEngine.php | 2 +- .../conduit/query/PhabricatorConduitSearchEngine.php | 2 +- .../query/PhabricatorCountdownSearchEngine.php | 2 +- ...atorDashboardPanelSearchApplicationCustomField.php | 11 +++++++++++ .../query/PhabricatorDashboardPanelSearchEngine.php | 2 +- .../query/PhabricatorDashboardSearchEngine.php | 2 +- .../query/DifferentialRevisionSearchEngine.php | 2 +- .../diviner/query/DivinerAtomSearchEngine.php | 2 +- .../drydock/query/DrydockBlueprintSearchEngine.php | 2 +- .../drydock/query/DrydockLeaseSearchEngine.php | 2 +- .../drydock/query/DrydockLogSearchEngine.php | 2 +- .../drydock/query/DrydockResourceSearchEngine.php | 2 +- .../feed/query/PhabricatorFeedSearchEngine.php | 4 ++++ .../files/query/PhabricatorFileSearchEngine.php | 2 +- .../flag/query/PhabricatorFlagSearchEngine.php | 2 +- .../fund/query/FundBackerSearchEngine.php | 2 +- .../fund/query/FundInitiativeSearchEngine.php | 2 +- .../query/HarbormasterBuildPlanSearchEngine.php | 2 +- .../query/HarbormasterBuildableSearchEngine.php | 2 +- .../herald/query/HeraldRuleSearchEngine.php | 2 +- .../herald/query/HeraldTranscriptSearchEngine.php | 2 +- .../legalpad/query/LegalpadDocumentSearchEngine.php | 2 +- .../query/LegalpadDocumentSignatureSearchEngine.php | 2 +- .../macro/query/PhabricatorMacroSearchEngine.php | 2 +- .../query/PhabricatorMailingListSearchEngine.php | 2 +- .../maniphest/query/ManiphestTaskSearchEngine.php | 2 +- .../meta/query/PhabricatorAppSearchEngine.php | 2 +- .../query/PhabricatorNotificationSearchEngine.php | 2 +- .../PhabricatorOAuthServerClientSearchEngine.php | 2 +- .../query/PassphraseCredentialSearchEngine.php | 2 +- .../paste/query/PhabricatorPasteSearchEngine.php | 4 ++++ .../people/query/PhabricatorPeopleLogSearchEngine.php | 2 +- .../people/query/PhabricatorPeopleSearchEngine.php | 2 +- .../pholio/query/PholioMockSearchEngine.php | 2 +- .../phortune/query/PhortuneCartSearchEngine.php | 4 ++++ .../phortune/query/PhortuneChargeSearchEngine.php | 4 ++++ .../phortune/query/PhortuneMerchantSearchEngine.php | 4 ++++ .../query/PhortuneSubscriptionSearchEngine.php | 4 ++++ .../phrequent/query/PhrequentSearchEngine.php | 2 +- .../phriction/query/PhrictionSearchEngine.php | 4 ++++ .../ponder/query/PonderQuestionSearchEngine.php | 2 +- .../project/query/PhabricatorProjectSearchEngine.php | 2 +- .../releeph/query/ReleephBranchSearchEngine.php | 4 ++++ .../releeph/query/ReleephProductSearchEngine.php | 2 +- .../releeph/query/ReleephRequestSearchEngine.php | 4 ++++ .../PhabricatorRepositoryPushLogSearchEngine.php | 2 +- .../query/PhabricatorRepositorySearchEngine.php | 2 +- .../engine/PhabricatorApplicationSearchEngine.php | 4 +--- .../PhabricatorSearchApplicationSearchEngine.php | 2 +- .../query/PhabricatorSlowvoteSearchEngine.php | 4 ++++ 54 files changed, 97 insertions(+), 44 deletions(-) diff --git a/src/applications/almanac/query/AlmanacDeviceSearchEngine.php b/src/applications/almanac/query/AlmanacDeviceSearchEngine.php index 8b487c5df8..e7b631e0bd 100644 --- a/src/applications/almanac/query/AlmanacDeviceSearchEngine.php +++ b/src/applications/almanac/query/AlmanacDeviceSearchEngine.php @@ -7,7 +7,7 @@ final class AlmanacDeviceSearchEngine return pht('Almanac Devices'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorAlmanacApplication'; } diff --git a/src/applications/almanac/query/AlmanacNetworkSearchEngine.php b/src/applications/almanac/query/AlmanacNetworkSearchEngine.php index e2b23d75b7..cb511d9c48 100644 --- a/src/applications/almanac/query/AlmanacNetworkSearchEngine.php +++ b/src/applications/almanac/query/AlmanacNetworkSearchEngine.php @@ -7,7 +7,7 @@ final class AlmanacNetworkSearchEngine return pht('Almanac Networks'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorAlmanacApplication'; } diff --git a/src/applications/almanac/query/AlmanacServiceSearchEngine.php b/src/applications/almanac/query/AlmanacServiceSearchEngine.php index e5a3c80560..fe51fd09f2 100644 --- a/src/applications/almanac/query/AlmanacServiceSearchEngine.php +++ b/src/applications/almanac/query/AlmanacServiceSearchEngine.php @@ -7,7 +7,7 @@ final class AlmanacServiceSearchEngine return pht('Almanac Services'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorAlmanacApplication'; } diff --git a/src/applications/audit/query/PhabricatorCommitSearchEngine.php b/src/applications/audit/query/PhabricatorCommitSearchEngine.php index 50ff7a0c1f..4e8dfd7d08 100644 --- a/src/applications/audit/query/PhabricatorCommitSearchEngine.php +++ b/src/applications/audit/query/PhabricatorCommitSearchEngine.php @@ -7,6 +7,10 @@ final class PhabricatorCommitSearchEngine return pht('Commits'); } + public function getApplicationClassName() { + return 'PhabricatorDiffusionApplication'; + } + public function buildSavedQueryFromRequest(AphrontRequest $request) { $saved = new PhabricatorSavedQuery(); diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php index ef6ee97d48..62e4a08a59 100644 --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorCalendarEventSearchEngine return pht('Calendar Events'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorCalendarApplication'; } diff --git a/src/applications/conduit/query/PhabricatorConduitSearchEngine.php b/src/applications/conduit/query/PhabricatorConduitSearchEngine.php index 199ab70216..0ed7a95b44 100644 --- a/src/applications/conduit/query/PhabricatorConduitSearchEngine.php +++ b/src/applications/conduit/query/PhabricatorConduitSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorConduitSearchEngine return pht('Conduit Methods'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorConduitApplication'; } diff --git a/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php b/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php index 2e8cab39d9..f15c1a2012 100644 --- a/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php +++ b/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorCountdownSearchEngine return pht('Countdowns'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorCountdownApplication'; } diff --git a/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php b/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php index 20c9034f89..508486b379 100644 --- a/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php +++ b/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php @@ -16,6 +16,17 @@ final class PhabricatorDashboardPanelSearchApplicationCustomField $engines = id(new PhutilSymbolLoader()) ->setAncestorClass('PhabricatorApplicationSearchEngine') ->loadObjects(); + $all_apps = id(new PhabricatorApplicationQuery()) + ->setViewer($this->getViewer()) + ->withUnlisted(false) + ->withInstalled(true) + ->execute(); + foreach ($engines as $index => $engine) { + if (!isset($all_apps[$engine->getApplicationClassName()])) { + unset($engines[$index]); + continue; + } + } $options = array(); diff --git a/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php b/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php index 7a50e56526..229250a55c 100644 --- a/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php +++ b/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorDashboardPanelSearchEngine return pht('Dashboard Panels'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorDashboardApplication'; } diff --git a/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php index f6f50b41ff..271e0b763c 100644 --- a/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php +++ b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorDashboardSearchEngine return pht('Dashboards'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorDashboardApplication'; } diff --git a/src/applications/differential/query/DifferentialRevisionSearchEngine.php b/src/applications/differential/query/DifferentialRevisionSearchEngine.php index d3cb3d9518..82e720a4e5 100644 --- a/src/applications/differential/query/DifferentialRevisionSearchEngine.php +++ b/src/applications/differential/query/DifferentialRevisionSearchEngine.php @@ -7,7 +7,7 @@ final class DifferentialRevisionSearchEngine return pht('Differential Revisions'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorDifferentialApplication'; } diff --git a/src/applications/diviner/query/DivinerAtomSearchEngine.php b/src/applications/diviner/query/DivinerAtomSearchEngine.php index ff9e7e480c..d1c0f734ed 100644 --- a/src/applications/diviner/query/DivinerAtomSearchEngine.php +++ b/src/applications/diviner/query/DivinerAtomSearchEngine.php @@ -6,7 +6,7 @@ final class DivinerAtomSearchEngine extends PhabricatorApplicationSearchEngine { return pht('Documentation Atoms'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorDivinerApplication'; } diff --git a/src/applications/drydock/query/DrydockBlueprintSearchEngine.php b/src/applications/drydock/query/DrydockBlueprintSearchEngine.php index 8895ed09bb..8b732e9313 100644 --- a/src/applications/drydock/query/DrydockBlueprintSearchEngine.php +++ b/src/applications/drydock/query/DrydockBlueprintSearchEngine.php @@ -7,7 +7,7 @@ final class DrydockBlueprintSearchEngine return pht('Drydock Blueprints'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorDrydockApplication'; } diff --git a/src/applications/drydock/query/DrydockLeaseSearchEngine.php b/src/applications/drydock/query/DrydockLeaseSearchEngine.php index fffca96a3b..39080a05ac 100644 --- a/src/applications/drydock/query/DrydockLeaseSearchEngine.php +++ b/src/applications/drydock/query/DrydockLeaseSearchEngine.php @@ -7,7 +7,7 @@ final class DrydockLeaseSearchEngine return pht('Drydock Leases'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorDrydockApplication'; } diff --git a/src/applications/drydock/query/DrydockLogSearchEngine.php b/src/applications/drydock/query/DrydockLogSearchEngine.php index 915c503868..1c4c2374e0 100644 --- a/src/applications/drydock/query/DrydockLogSearchEngine.php +++ b/src/applications/drydock/query/DrydockLogSearchEngine.php @@ -6,7 +6,7 @@ final class DrydockLogSearchEngine extends PhabricatorApplicationSearchEngine { return pht('Drydock Logs'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorDrydockApplication'; } diff --git a/src/applications/drydock/query/DrydockResourceSearchEngine.php b/src/applications/drydock/query/DrydockResourceSearchEngine.php index a17d2fd600..1a9b93b465 100644 --- a/src/applications/drydock/query/DrydockResourceSearchEngine.php +++ b/src/applications/drydock/query/DrydockResourceSearchEngine.php @@ -7,7 +7,7 @@ final class DrydockResourceSearchEngine return pht('Drydock Resources'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorDrydockApplication'; } diff --git a/src/applications/feed/query/PhabricatorFeedSearchEngine.php b/src/applications/feed/query/PhabricatorFeedSearchEngine.php index d84960e950..49d65770bd 100644 --- a/src/applications/feed/query/PhabricatorFeedSearchEngine.php +++ b/src/applications/feed/query/PhabricatorFeedSearchEngine.php @@ -7,6 +7,10 @@ final class PhabricatorFeedSearchEngine return pht('Feed Stories'); } + public function getApplicationClassName() { + return 'PhabricatorFeedApplication'; + } + public function buildSavedQueryFromRequest(AphrontRequest $request) { $saved = new PhabricatorSavedQuery(); diff --git a/src/applications/files/query/PhabricatorFileSearchEngine.php b/src/applications/files/query/PhabricatorFileSearchEngine.php index c11361be69..fa9d2332c7 100644 --- a/src/applications/files/query/PhabricatorFileSearchEngine.php +++ b/src/applications/files/query/PhabricatorFileSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorFileSearchEngine return pht('Files'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorFilesApplication'; } diff --git a/src/applications/flag/query/PhabricatorFlagSearchEngine.php b/src/applications/flag/query/PhabricatorFlagSearchEngine.php index 4c9308f04f..9975a3985f 100644 --- a/src/applications/flag/query/PhabricatorFlagSearchEngine.php +++ b/src/applications/flag/query/PhabricatorFlagSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorFlagSearchEngine return pht('Flags'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorFlagsApplication'; } diff --git a/src/applications/fund/query/FundBackerSearchEngine.php b/src/applications/fund/query/FundBackerSearchEngine.php index a634fbfe42..563838a954 100644 --- a/src/applications/fund/query/FundBackerSearchEngine.php +++ b/src/applications/fund/query/FundBackerSearchEngine.php @@ -18,7 +18,7 @@ final class FundBackerSearchEngine return pht('Fund Backers'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorFundApplication'; } diff --git a/src/applications/fund/query/FundInitiativeSearchEngine.php b/src/applications/fund/query/FundInitiativeSearchEngine.php index 63c25952ee..52c97e7a95 100644 --- a/src/applications/fund/query/FundInitiativeSearchEngine.php +++ b/src/applications/fund/query/FundInitiativeSearchEngine.php @@ -7,7 +7,7 @@ final class FundInitiativeSearchEngine return pht('Fund Initiatives'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorFundApplication'; } diff --git a/src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php b/src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php index d72d9e18f3..dce8672a56 100644 --- a/src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php +++ b/src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php @@ -7,7 +7,7 @@ final class HarbormasterBuildPlanSearchEngine return pht('Harbormaster Build Plans'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorHarbormasterApplication'; } diff --git a/src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php b/src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php index 48dc7053cb..74883c5c10 100644 --- a/src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php +++ b/src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php @@ -7,7 +7,7 @@ final class HarbormasterBuildableSearchEngine return pht('Harbormaster Buildables'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorHarbormasterApplication'; } diff --git a/src/applications/herald/query/HeraldRuleSearchEngine.php b/src/applications/herald/query/HeraldRuleSearchEngine.php index 1d8bfdda6b..dace06725d 100644 --- a/src/applications/herald/query/HeraldRuleSearchEngine.php +++ b/src/applications/herald/query/HeraldRuleSearchEngine.php @@ -6,7 +6,7 @@ final class HeraldRuleSearchEngine extends PhabricatorApplicationSearchEngine { return pht('Herald Rules'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorHeraldApplication'; } diff --git a/src/applications/herald/query/HeraldTranscriptSearchEngine.php b/src/applications/herald/query/HeraldTranscriptSearchEngine.php index 9696a84391..f6944e1215 100644 --- a/src/applications/herald/query/HeraldTranscriptSearchEngine.php +++ b/src/applications/herald/query/HeraldTranscriptSearchEngine.php @@ -7,7 +7,7 @@ final class HeraldTranscriptSearchEngine return pht('Herald Transcripts'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorHeraldApplication'; } diff --git a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php index 65400d765c..ebc9cd2b03 100644 --- a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php +++ b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php @@ -7,7 +7,7 @@ final class LegalpadDocumentSearchEngine return pht('Legalpad Documents'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorLegalpadApplication'; } diff --git a/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php b/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php index 6ff09f412c..9f77866560 100644 --- a/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php +++ b/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php @@ -9,7 +9,7 @@ final class LegalpadDocumentSignatureSearchEngine return pht('Legalpad Signatures'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorLegalpadApplication'; } diff --git a/src/applications/macro/query/PhabricatorMacroSearchEngine.php b/src/applications/macro/query/PhabricatorMacroSearchEngine.php index 934d98bb01..8e00c45f17 100644 --- a/src/applications/macro/query/PhabricatorMacroSearchEngine.php +++ b/src/applications/macro/query/PhabricatorMacroSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorMacroSearchEngine return pht('Macros'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorMacroApplication'; } diff --git a/src/applications/mailinglists/query/PhabricatorMailingListSearchEngine.php b/src/applications/mailinglists/query/PhabricatorMailingListSearchEngine.php index 54fe898546..50443430a9 100644 --- a/src/applications/mailinglists/query/PhabricatorMailingListSearchEngine.php +++ b/src/applications/mailinglists/query/PhabricatorMailingListSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorMailingListSearchEngine return pht('Mailing Lists'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorMailingListsApplication'; } diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php index 4d0e1381d7..7ad2a09d5b 100644 --- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php +++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php @@ -34,7 +34,7 @@ final class ManiphestTaskSearchEngine return pht('Tasks'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorManiphestApplication'; } diff --git a/src/applications/meta/query/PhabricatorAppSearchEngine.php b/src/applications/meta/query/PhabricatorAppSearchEngine.php index 6e9bd71239..a25260b6f6 100644 --- a/src/applications/meta/query/PhabricatorAppSearchEngine.php +++ b/src/applications/meta/query/PhabricatorAppSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorAppSearchEngine return pht('Applications'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorApplicationsApplication'; } diff --git a/src/applications/notification/query/PhabricatorNotificationSearchEngine.php b/src/applications/notification/query/PhabricatorNotificationSearchEngine.php index aa6d14212e..ea1c3beef4 100644 --- a/src/applications/notification/query/PhabricatorNotificationSearchEngine.php +++ b/src/applications/notification/query/PhabricatorNotificationSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorNotificationSearchEngine return pht('Notifications'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorNotificationsApplication'; } diff --git a/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php b/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php index e0729015f2..634debc43e 100644 --- a/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php +++ b/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorOAuthServerClientSearchEngine return pht('OAuth Clients'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorOAuthServerApplication'; } diff --git a/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php b/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php index 3f1bac81e5..f503510e5a 100644 --- a/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php +++ b/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php @@ -7,7 +7,7 @@ final class PassphraseCredentialSearchEngine return pht('Passphrase Credentials'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorPassphraseApplication'; } diff --git a/src/applications/paste/query/PhabricatorPasteSearchEngine.php b/src/applications/paste/query/PhabricatorPasteSearchEngine.php index d1c90e093d..d2d677ea5a 100644 --- a/src/applications/paste/query/PhabricatorPasteSearchEngine.php +++ b/src/applications/paste/query/PhabricatorPasteSearchEngine.php @@ -7,6 +7,10 @@ final class PhabricatorPasteSearchEngine return pht('Pastes'); } + public function getApplicationClassName() { + return 'PhabricatorPasteApplication'; + } + public function buildSavedQueryFromRequest(AphrontRequest $request) { $saved = new PhabricatorSavedQuery(); $saved->setParameter( diff --git a/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php b/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php index 5c1836ce8c..8e75efed6c 100644 --- a/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php +++ b/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorPeopleLogSearchEngine return pht('Account Activity'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorPeopleApplication'; } diff --git a/src/applications/people/query/PhabricatorPeopleSearchEngine.php b/src/applications/people/query/PhabricatorPeopleSearchEngine.php index 4fbb1371fc..4785cd985d 100644 --- a/src/applications/people/query/PhabricatorPeopleSearchEngine.php +++ b/src/applications/people/query/PhabricatorPeopleSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorPeopleSearchEngine return pht('Users'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorPeopleApplication'; } diff --git a/src/applications/pholio/query/PholioMockSearchEngine.php b/src/applications/pholio/query/PholioMockSearchEngine.php index 2940031057..478e2cc219 100644 --- a/src/applications/pholio/query/PholioMockSearchEngine.php +++ b/src/applications/pholio/query/PholioMockSearchEngine.php @@ -6,7 +6,7 @@ final class PholioMockSearchEngine extends PhabricatorApplicationSearchEngine { return pht('Pholio Mocks'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorPholioApplication'; } diff --git a/src/applications/phortune/query/PhortuneCartSearchEngine.php b/src/applications/phortune/query/PhortuneCartSearchEngine.php index fca225a612..72f4fa3469 100644 --- a/src/applications/phortune/query/PhortuneCartSearchEngine.php +++ b/src/applications/phortune/query/PhortuneCartSearchEngine.php @@ -38,6 +38,10 @@ final class PhortuneCartSearchEngine return pht('Phortune Orders'); } + public function getApplicationClassName() { + return 'PhabricatorPhortuneApplication'; + } + public function buildSavedQueryFromRequest(AphrontRequest $request) { $saved = new PhabricatorSavedQuery(); diff --git a/src/applications/phortune/query/PhortuneChargeSearchEngine.php b/src/applications/phortune/query/PhortuneChargeSearchEngine.php index ba87cffc75..939eadd5c5 100644 --- a/src/applications/phortune/query/PhortuneChargeSearchEngine.php +++ b/src/applications/phortune/query/PhortuneChargeSearchEngine.php @@ -18,6 +18,10 @@ final class PhortuneChargeSearchEngine return pht('Phortune Charges'); } + public function getApplicationClassName() { + return 'PhabricatorPhortuneApplication'; + } + public function buildSavedQueryFromRequest(AphrontRequest $request) { $saved = new PhabricatorSavedQuery(); diff --git a/src/applications/phortune/query/PhortuneMerchantSearchEngine.php b/src/applications/phortune/query/PhortuneMerchantSearchEngine.php index efb8cd5672..20f1da8e6e 100644 --- a/src/applications/phortune/query/PhortuneMerchantSearchEngine.php +++ b/src/applications/phortune/query/PhortuneMerchantSearchEngine.php @@ -7,6 +7,10 @@ final class PhortuneMerchantSearchEngine return pht('Phortune Merchants'); } + public function getApplicationClassName() { + return 'PhabricatorPhortuneApplication'; + } + public function buildSavedQueryFromRequest(AphrontRequest $request) { $saved = new PhabricatorSavedQuery(); diff --git a/src/applications/phortune/query/PhortuneSubscriptionSearchEngine.php b/src/applications/phortune/query/PhortuneSubscriptionSearchEngine.php index 90ea7f82fa..0806197dd8 100644 --- a/src/applications/phortune/query/PhortuneSubscriptionSearchEngine.php +++ b/src/applications/phortune/query/PhortuneSubscriptionSearchEngine.php @@ -28,6 +28,10 @@ final class PhortuneSubscriptionSearchEngine return pht('Phortune Subscriptions'); } + public function getApplicationClassName() { + return 'PhabricatorPhortuneApplication'; + } + public function buildSavedQueryFromRequest(AphrontRequest $request) { $saved = new PhabricatorSavedQuery(); diff --git a/src/applications/phrequent/query/PhrequentSearchEngine.php b/src/applications/phrequent/query/PhrequentSearchEngine.php index 65fb33bd11..b5737c945c 100644 --- a/src/applications/phrequent/query/PhrequentSearchEngine.php +++ b/src/applications/phrequent/query/PhrequentSearchEngine.php @@ -6,7 +6,7 @@ final class PhrequentSearchEngine extends PhabricatorApplicationSearchEngine { return pht('Phrequent Time'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorPhrequentApplication'; } diff --git a/src/applications/phriction/query/PhrictionSearchEngine.php b/src/applications/phriction/query/PhrictionSearchEngine.php index 624fb99918..dea2e3120a 100644 --- a/src/applications/phriction/query/PhrictionSearchEngine.php +++ b/src/applications/phriction/query/PhrictionSearchEngine.php @@ -7,6 +7,10 @@ final class PhrictionSearchEngine return pht('Wiki Documents'); } + public function getApplicationClassName() { + return 'PhabricatorPhrictionApplication'; + } + public function buildSavedQueryFromRequest(AphrontRequest $request) { $saved = new PhabricatorSavedQuery(); diff --git a/src/applications/ponder/query/PonderQuestionSearchEngine.php b/src/applications/ponder/query/PonderQuestionSearchEngine.php index ef1d277c5e..462046544c 100644 --- a/src/applications/ponder/query/PonderQuestionSearchEngine.php +++ b/src/applications/ponder/query/PonderQuestionSearchEngine.php @@ -7,7 +7,7 @@ final class PonderQuestionSearchEngine return pht('Ponder Questions'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorPonderApplication'; } diff --git a/src/applications/project/query/PhabricatorProjectSearchEngine.php b/src/applications/project/query/PhabricatorProjectSearchEngine.php index 28013ec4dc..0297e910e5 100644 --- a/src/applications/project/query/PhabricatorProjectSearchEngine.php +++ b/src/applications/project/query/PhabricatorProjectSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorProjectSearchEngine return pht('Projects'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorProjectApplication'; } diff --git a/src/applications/releeph/query/ReleephBranchSearchEngine.php b/src/applications/releeph/query/ReleephBranchSearchEngine.php index 24f0a9818a..8f8810f670 100644 --- a/src/applications/releeph/query/ReleephBranchSearchEngine.php +++ b/src/applications/releeph/query/ReleephBranchSearchEngine.php @@ -9,6 +9,10 @@ final class ReleephBranchSearchEngine return pht('Releeph Branches'); } + public function getApplicationClassName() { + return 'PhabricatorReleephApplication'; + } + public function setProduct(ReleephProject $product) { $this->product = $product; return $this; diff --git a/src/applications/releeph/query/ReleephProductSearchEngine.php b/src/applications/releeph/query/ReleephProductSearchEngine.php index e3a30c1a56..51f1bcb560 100644 --- a/src/applications/releeph/query/ReleephProductSearchEngine.php +++ b/src/applications/releeph/query/ReleephProductSearchEngine.php @@ -7,7 +7,7 @@ final class ReleephProductSearchEngine return pht('Releeph Products'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorReleephApplication'; } diff --git a/src/applications/releeph/query/ReleephRequestSearchEngine.php b/src/applications/releeph/query/ReleephRequestSearchEngine.php index 35ebb3c202..5f2626614b 100644 --- a/src/applications/releeph/query/ReleephRequestSearchEngine.php +++ b/src/applications/releeph/query/ReleephRequestSearchEngine.php @@ -10,6 +10,10 @@ final class ReleephRequestSearchEngine return pht('Releeph Pull Requests'); } + public function getApplicationClassName() { + return 'PhabricatorReleephApplication'; + } + public function setBranch(ReleephBranch $branch) { $this->branch = $branch; return $this; diff --git a/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php b/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php index 68fc754a40..25cb871cfc 100644 --- a/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php +++ b/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorRepositoryPushLogSearchEngine return pht('Push Logs'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorDiffusionApplication'; } diff --git a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php index 90b1afaa5d..6a2a2458f2 100644 --- a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php +++ b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorRepositorySearchEngine return pht('Repositories'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorDiffusionApplication'; } diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php index adc0b9146e..cdbd41275e 100644 --- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php +++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php @@ -243,9 +243,7 @@ abstract class PhabricatorApplicationSearchEngine { return $this->application; } - protected function getApplicationClassName() { - throw new PhutilMethodNotImplementedException(); - } + abstract public function getApplicationClassName(); /* -( Constructing Engines )----------------------------------------------- */ diff --git a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php index f810dcb76b..5b1e79cc2f 100644 --- a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php +++ b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php @@ -7,7 +7,7 @@ final class PhabricatorSearchApplicationSearchEngine return pht('Fulltext Results'); } - protected function getApplicationClassName() { + public function getApplicationClassName() { return 'PhabricatorSearchApplication'; } diff --git a/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php b/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php index 25f5e59f60..33520978a1 100644 --- a/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php +++ b/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php @@ -7,6 +7,10 @@ final class PhabricatorSlowvoteSearchEngine return pht('Slowvotes'); } + public function getApplicationClassName() { + return 'PhabricatorSlowvoteApplication'; + } + public function buildSavedQueryFromRequest(AphrontRequest $request) { $saved = new PhabricatorSavedQuery(); $saved->setParameter(