diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index e52be6e81e..7cda5a1c7e 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1560,6 +1560,7 @@ phutil_register_library_map(array( 'PhabricatorMainMenuIconView' => 'view/page/menu/PhabricatorMainMenuIconView.php', 'PhabricatorMainMenuSearchView' => 'view/page/menu/PhabricatorMainMenuSearchView.php', 'PhabricatorMainMenuView' => 'view/page/menu/PhabricatorMainMenuView.php', + 'PhabricatorManagementWorkflow' => 'infrastructure/management/PhabricatorManagementWorkflow.php', 'PhabricatorManiphestConfigOptions' => 'applications/maniphest/config/PhabricatorManiphestConfigOptions.php', 'PhabricatorManiphestTaskTestDataGenerator' => 'applications/maniphest/lipsum/PhabricatorManiphestTaskTestDataGenerator.php', 'PhabricatorMarkupCache' => 'applications/cache/storage/PhabricatorMarkupCache.php', @@ -3020,7 +3021,7 @@ phutil_register_library_map(array( 'DivinerReturnTableView' => 'AphrontTagView', 'DivinerSectionView' => 'AphrontTagView', 'DivinerStaticPublisher' => 'DivinerPublisher', - 'DivinerWorkflow' => 'PhutilArgumentWorkflow', + 'DivinerWorkflow' => 'PhabricatorManagementWorkflow', 'DoorkeeperBridge' => 'Phobject', 'DoorkeeperBridgeAsana' => 'DoorkeeperBridge', 'DoorkeeperBridgeJIRA' => 'DoorkeeperBridge', @@ -3099,7 +3100,7 @@ phutil_register_library_map(array( 'DrydockManagementCreateResourceWorkflow' => 'DrydockManagementWorkflow', 'DrydockManagementLeaseWorkflow' => 'DrydockManagementWorkflow', 'DrydockManagementReleaseWorkflow' => 'DrydockManagementWorkflow', - 'DrydockManagementWorkflow' => 'PhutilArgumentWorkflow', + 'DrydockManagementWorkflow' => 'PhabricatorManagementWorkflow', 'DrydockPHIDTypeBlueprint' => 'PhabricatorPHIDType', 'DrydockPHIDTypeLease' => 'PhabricatorPHIDType', 'DrydockPHIDTypeResource' => 'PhabricatorPHIDType', @@ -3197,7 +3198,7 @@ phutil_register_library_map(array( 'HarbormasterDAO' => 'PhabricatorLiskDAO', 'HarbormasterHTTPRequestBuildStepImplementation' => 'VariableBuildStepImplementation', 'HarbormasterManagementBuildWorkflow' => 'HarbormasterManagementWorkflow', - 'HarbormasterManagementWorkflow' => 'PhutilArgumentWorkflow', + 'HarbormasterManagementWorkflow' => 'PhabricatorManagementWorkflow', 'HarbormasterObject' => 'HarbormasterDAO', 'HarbormasterPHIDTypeBuild' => 'PhabricatorPHIDType', 'HarbormasterPHIDTypeBuildItem' => 'PhabricatorPHIDType', @@ -3672,7 +3673,7 @@ phutil_register_library_map(array( 'PhabricatorAuditListView' => 'AphrontView', 'PhabricatorAuditMailReceiver' => 'PhabricatorObjectMailReceiver', 'PhabricatorAuditManagementDeleteWorkflow' => 'PhabricatorAuditManagementWorkflow', - 'PhabricatorAuditManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorAuditManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorAuditPreviewController' => 'PhabricatorAuditController', 'PhabricatorAuditReplyHandler' => 'PhabricatorMailReplyHandler', 'PhabricatorAuthAccountView' => 'AphrontView', @@ -3687,7 +3688,7 @@ phutil_register_library_map(array( 'PhabricatorAuthManagementLDAPWorkflow' => 'PhabricatorAuthManagementWorkflow', 'PhabricatorAuthManagementRecoverWorkflow' => 'PhabricatorAuthManagementWorkflow', 'PhabricatorAuthManagementRefreshWorkflow' => 'PhabricatorAuthManagementWorkflow', - 'PhabricatorAuthManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorAuthManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorAuthNeedsApprovalController' => 'PhabricatorAuthController', 'PhabricatorAuthNewController' => 'PhabricatorAuthProviderConfigController', 'PhabricatorAuthOldOAuthRedirectController' => 'PhabricatorAuthController', @@ -3740,7 +3741,7 @@ phutil_register_library_map(array( 'PhabricatorBusyExample' => 'PhabricatorUIExample', 'PhabricatorCacheDAO' => 'PhabricatorLiskDAO', 'PhabricatorCacheManagementPurgeWorkflow' => 'PhabricatorSearchManagementWorkflow', - 'PhabricatorCacheManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorCacheManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorCalendarBrowseController' => 'PhabricatorCalendarController', 'PhabricatorCalendarController' => 'PhabricatorController', 'PhabricatorCalendarDAO' => 'PhabricatorLiskDAO', @@ -3815,7 +3816,7 @@ phutil_register_library_map(array( 'PhabricatorConfigManagementGetWorkflow' => 'PhabricatorConfigManagementWorkflow', 'PhabricatorConfigManagementListWorkflow' => 'PhabricatorConfigManagementWorkflow', 'PhabricatorConfigManagementSetWorkflow' => 'PhabricatorConfigManagementWorkflow', - 'PhabricatorConfigManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorConfigManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorConfigOption' => array( 0 => 'Phobject', @@ -3892,7 +3893,7 @@ phutil_register_library_map(array( 'PhabricatorDaemonManagementStartWorkflow' => 'PhabricatorDaemonManagementWorkflow', 'PhabricatorDaemonManagementStatusWorkflow' => 'PhabricatorDaemonManagementWorkflow', 'PhabricatorDaemonManagementStopWorkflow' => 'PhabricatorDaemonManagementWorkflow', - 'PhabricatorDaemonManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorDaemonManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorDataNotAttachedException' => 'Exception', 'PhabricatorDebugController' => 'PhabricatorController', 'PhabricatorDefaultFileStorageEngineSelector' => 'PhabricatorFileStorageEngineSelector', @@ -3946,7 +3947,7 @@ phutil_register_library_map(array( 'PhabricatorFactManagementDestroyWorkflow' => 'PhabricatorFactManagementWorkflow', 'PhabricatorFactManagementListWorkflow' => 'PhabricatorFactManagementWorkflow', 'PhabricatorFactManagementStatusWorkflow' => 'PhabricatorFactManagementWorkflow', - 'PhabricatorFactManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorFactManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorFactRaw' => 'PhabricatorFactDAO', 'PhabricatorFactSimpleSpec' => 'PhabricatorFactSpec', 'PhabricatorFactUpdateIterator' => 'PhutilBufferedIterator', @@ -3960,7 +3961,7 @@ phutil_register_library_map(array( 1 => 'PhabricatorApplicationSearchResultsControllerInterface', ), 'PhabricatorFeedManagementRepublishWorkflow' => 'PhabricatorFeedManagementWorkflow', - 'PhabricatorFeedManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorFeedManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorFeedPublicStreamController' => 'PhabricatorFeedController', 'PhabricatorFeedQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorFeedSearchEngine' => 'PhabricatorApplicationSearchEngine', @@ -4029,7 +4030,7 @@ phutil_register_library_map(array( 'PhabricatorFilesManagementMigrateWorkflow' => 'PhabricatorFilesManagementWorkflow', 'PhabricatorFilesManagementPurgeWorkflow' => 'PhabricatorFilesManagementWorkflow', 'PhabricatorFilesManagementRebuildWorkflow' => 'PhabricatorFilesManagementWorkflow', - 'PhabricatorFilesManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorFilesManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorFlag' => array( 0 => 'PhabricatorFlagDAO', @@ -4077,7 +4078,7 @@ phutil_register_library_map(array( 'PhabricatorLegalpadPHIDTypeDocument' => 'PhabricatorPHIDType', 'PhabricatorLintEngine' => 'PhutilLintEngine', 'PhabricatorLipsumGenerateWorkflow' => 'PhabricatorLipsumManagementWorkflow', - 'PhabricatorLipsumManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorLipsumManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorLipsumMondrianArtist' => 'PhabricatorLipsumArtist', 'PhabricatorLiskDAO' => 'LiskDAO', 'PhabricatorLocalDiskFileStorageEngine' => 'PhabricatorFileStorageEngine', @@ -4119,7 +4120,7 @@ phutil_register_library_map(array( 'PhabricatorMailManagementSendTestWorkflow' => 'PhabricatorSearchManagementWorkflow', 'PhabricatorMailManagementShowInboundWorkflow' => 'PhabricatorSearchManagementWorkflow', 'PhabricatorMailManagementShowOutboundWorkflow' => 'PhabricatorSearchManagementWorkflow', - 'PhabricatorMailManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorMailManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorMailReceiverTestCase' => 'PhabricatorTestCase', 'PhabricatorMailingListPHIDTypeList' => 'PhabricatorPHIDType', 'PhabricatorMailingListQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', @@ -4135,6 +4136,7 @@ phutil_register_library_map(array( 'PhabricatorMainMenuIconView' => 'AphrontView', 'PhabricatorMainMenuSearchView' => 'AphrontView', 'PhabricatorMainMenuView' => 'AphrontView', + 'PhabricatorManagementWorkflow' => 'PhutilArgumentWorkflow', 'PhabricatorManiphestConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorManiphestTaskTestDataGenerator' => 'PhabricatorTestDataGenerator', 'PhabricatorMarkupCache' => 'PhabricatorCacheDAO', @@ -4305,7 +4307,7 @@ phutil_register_library_map(array( 'PhabricatorPolicyInterface' => 'PhabricatorPHIDInterface', 'PhabricatorPolicyManagementShowWorkflow' => 'PhabricatorPolicyManagementWorkflow', 'PhabricatorPolicyManagementUnlockWorkflow' => 'PhabricatorPolicyManagementWorkflow', - 'PhabricatorPolicyManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorPolicyManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorPolicyPHIDTypePolicy' => 'PhabricatorPHIDType', 'PhabricatorPolicyQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorPolicyRuleAdministrators' => 'PhabricatorPolicyRule', @@ -4421,7 +4423,7 @@ phutil_register_library_map(array( 'PhabricatorRepositoryManagementLookupUsersWorkflow' => 'PhabricatorRepositoryManagementWorkflow', 'PhabricatorRepositoryManagementMarkImportedWorkflow' => 'PhabricatorRepositoryManagementWorkflow', 'PhabricatorRepositoryManagementPullWorkflow' => 'PhabricatorRepositoryManagementWorkflow', - 'PhabricatorRepositoryManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorRepositoryManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorRepositoryMercurialCommitChangeParserWorker' => 'PhabricatorRepositoryCommitChangeParserWorker', 'PhabricatorRepositoryMercurialCommitMessageParserWorker' => 'PhabricatorRepositoryCommitMessageParserWorker', 'PhabricatorRepositoryMirror' => @@ -4459,7 +4461,7 @@ phutil_register_library_map(array( 'PhabricatorS3FileStorageEngine' => 'PhabricatorFileStorageEngine', 'PhabricatorSSHLog' => 'Phobject', 'PhabricatorSSHPassthruCommand' => 'Phobject', - 'PhabricatorSSHWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorSSHWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorSavedQuery' => array( 0 => 'PhabricatorSearchDAO', @@ -4480,7 +4482,7 @@ phutil_register_library_map(array( 'PhabricatorSearchEngineMySQL' => 'PhabricatorSearchEngine', 'PhabricatorSearchHovercardController' => 'PhabricatorSearchBaseController', 'PhabricatorSearchManagementIndexWorkflow' => 'PhabricatorSearchManagementWorkflow', - 'PhabricatorSearchManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorSearchManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorSearchOrderController' => 'PhabricatorSearchBaseController', 'PhabricatorSearchQuery' => 'PhabricatorSearchDAO', 'PhabricatorSearchResultView' => 'AphrontView', @@ -4574,7 +4576,7 @@ phutil_register_library_map(array( 'PhabricatorStorageManagementProbeWorkflow' => 'PhabricatorStorageManagementWorkflow', 'PhabricatorStorageManagementStatusWorkflow' => 'PhabricatorStorageManagementWorkflow', 'PhabricatorStorageManagementUpgradeWorkflow' => 'PhabricatorStorageManagementWorkflow', - 'PhabricatorStorageManagementWorkflow' => 'PhutilArgumentWorkflow', + 'PhabricatorStorageManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorSubscribersQuery' => 'PhabricatorQuery', 'PhabricatorSubscriptionsEditController' => 'PhabricatorController', 'PhabricatorSubscriptionsEditor' => 'PhabricatorEditor', diff --git a/src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php b/src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php index a06deea931..001e1ffe48 100644 --- a/src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php +++ b/src/applications/audit/management/PhabricatorAuditManagementDeleteWorkflow.php @@ -178,10 +178,6 @@ final class PhabricatorAuditManagementDeleteWorkflow return 0; } - private function getViewer() { - return PhabricatorUser::getOmnipotentUser(); - } - private function loadUsers($users) { $users = $this->parseList($users); if (!$users) { diff --git a/src/applications/audit/management/PhabricatorAuditManagementWorkflow.php b/src/applications/audit/management/PhabricatorAuditManagementWorkflow.php index 99ad58fc5e..27bc7702d0 100644 --- a/src/applications/audit/management/PhabricatorAuditManagementWorkflow.php +++ b/src/applications/audit/management/PhabricatorAuditManagementWorkflow.php @@ -1,10 +1,6 @@ setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->withIsAdmin(true) ->execute(); if (!$can_recover) { @@ -48,7 +48,7 @@ final class PhabricatorAuthManagementRecoverWorkflow $username = head($usernames); $user = id(new PhabricatorPeopleQuery()) - ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->withUsernames(array($username)) ->executeOne(); diff --git a/src/applications/auth/management/PhabricatorAuthManagementRefreshWorkflow.php b/src/applications/auth/management/PhabricatorAuthManagementRefreshWorkflow.php index b36f28e0dc..86cb03a21f 100644 --- a/src/applications/auth/management/PhabricatorAuthManagementRefreshWorkflow.php +++ b/src/applications/auth/management/PhabricatorAuthManagementRefreshWorkflow.php @@ -33,7 +33,7 @@ final class PhabricatorAuthManagementRefreshWorkflow public function execute(PhutilArgumentParser $args) { $console = PhutilConsole::getConsole(); - $viewer = PhabricatorUser::getOmnipotentUser(); + $viewer = $this->getViewer(); $query = id(new PhabricatorExternalAccountQuery()) ->setViewer($viewer); diff --git a/src/applications/auth/management/PhabricatorAuthManagementWorkflow.php b/src/applications/auth/management/PhabricatorAuthManagementWorkflow.php index 60643c1e4e..c73deff290 100644 --- a/src/applications/auth/management/PhabricatorAuthManagementWorkflow.php +++ b/src/applications/auth/management/PhabricatorAuthManagementWorkflow.php @@ -1,10 +1,6 @@ setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->withIDs(array($id)) ->executeOne(); diff --git a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php index fef75d856c..54e071b201 100644 --- a/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php +++ b/src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php @@ -1,11 +1,7 @@ bookConfigPath; } - public function isExecutable() { - return true; - } - protected function getConfig($key, $default = null) { return idx($this->config, $key, $default); } diff --git a/src/applications/drydock/management/DrydockManagementCloseWorkflow.php b/src/applications/drydock/management/DrydockManagementCloseWorkflow.php index 1261778c78..684a5333cf 100644 --- a/src/applications/drydock/management/DrydockManagementCloseWorkflow.php +++ b/src/applications/drydock/management/DrydockManagementCloseWorkflow.php @@ -25,7 +25,7 @@ final class DrydockManagementCloseWorkflow "Specify one or more resource IDs to close."); } - $viewer = PhabricatorUser::getOmnipotentUser(); + $viewer = $this->getViewer(); $resources = id(new DrydockResourceQuery()) ->setViewer($viewer) diff --git a/src/applications/drydock/management/DrydockManagementCreateResourceWorkflow.php b/src/applications/drydock/management/DrydockManagementCreateResourceWorkflow.php index 40899c1bb1..82259d5d2b 100644 --- a/src/applications/drydock/management/DrydockManagementCreateResourceWorkflow.php +++ b/src/applications/drydock/management/DrydockManagementCreateResourceWorkflow.php @@ -49,7 +49,7 @@ final class DrydockManagementCreateResourceWorkflow $attributes = $options->parse($attributes); } - $viewer = PhabricatorUser::getOmnipotentUser(); + $viewer = $this->getViewer(); $blueprint = id(new DrydockBlueprintQuery()) ->setViewer($viewer) diff --git a/src/applications/drydock/management/DrydockManagementReleaseWorkflow.php b/src/applications/drydock/management/DrydockManagementReleaseWorkflow.php index 5f482786ad..5913bda447 100644 --- a/src/applications/drydock/management/DrydockManagementReleaseWorkflow.php +++ b/src/applications/drydock/management/DrydockManagementReleaseWorkflow.php @@ -25,7 +25,7 @@ final class DrydockManagementReleaseWorkflow "Specify one or more lease IDs to release."); } - $viewer = PhabricatorUser::getOmnipotentUser(); + $viewer = $this->getViewer(); $leases = id(new DrydockLeaseQuery()) ->setViewer($viewer) diff --git a/src/applications/drydock/management/DrydockManagementWorkflow.php b/src/applications/drydock/management/DrydockManagementWorkflow.php index ad2cb70fb3..d4ffd0bfd3 100644 --- a/src/applications/drydock/management/DrydockManagementWorkflow.php +++ b/src/applications/drydock/management/DrydockManagementWorkflow.php @@ -1,10 +1,6 @@ getViewer(); $key = $args->getArg('key'); if (count($key) < 1) { diff --git a/src/applications/feed/management/PhabricatorFeedManagementWorkflow.php b/src/applications/feed/management/PhabricatorFeedManagementWorkflow.php index 109ca98084..0895e1ed21 100644 --- a/src/applications/feed/management/PhabricatorFeedManagementWorkflow.php +++ b/src/applications/feed/management/PhabricatorFeedManagementWorkflow.php @@ -1,10 +1,6 @@ getArg('names'); @@ -20,7 +16,7 @@ abstract class PhabricatorFilesManagementWorkflow if ($names) { $query = id(new PhabricatorObjectQuery()) - ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->withNames($names) ->withTypes(array(PhabricatorFilePHIDTypeFile::TYPECONST)); diff --git a/src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php b/src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php index 0785583d78..6dec30b2ae 100644 --- a/src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php +++ b/src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php @@ -23,7 +23,7 @@ final class HarbormasterManagementBuildWorkflow } public function execute(PhutilArgumentParser $args) { - $viewer = PhabricatorUser::getOmnipotentUser(); + $viewer = $this->getViewer(); $names = $args->getArg('buildable'); if (count($names) != 1) { diff --git a/src/applications/harbormaster/management/HarbormasterManagementWorkflow.php b/src/applications/harbormaster/management/HarbormasterManagementWorkflow.php index a0cdd4cfb6..c92e97fa57 100644 --- a/src/applications/harbormaster/management/HarbormasterManagementWorkflow.php +++ b/src/applications/harbormaster/management/HarbormasterManagementWorkflow.php @@ -1,10 +1,6 @@ getViewer(); try { $taskgen = newv($type, array()); $object = $taskgen->generate(); diff --git a/src/applications/lipsum/management/PhabricatorLipsumManagementWorkflow.php b/src/applications/lipsum/management/PhabricatorLipsumManagementWorkflow.php index a62a7dec63..ea5176403d 100644 --- a/src/applications/lipsum/management/PhabricatorLipsumManagementWorkflow.php +++ b/src/applications/lipsum/management/PhabricatorLipsumManagementWorkflow.php @@ -1,10 +1,6 @@ getViewer(); $mails = id(new PhabricatorMetaMTAReceivedMail())->loadAllWhere( '1 = 1 ORDER BY id DESC LIMIT %d', diff --git a/src/applications/metamta/management/PhabricatorMailManagementListOutboundWorkflow.php b/src/applications/metamta/management/PhabricatorMailManagementListOutboundWorkflow.php index 0d0a9a59bc..6fe170f7d2 100644 --- a/src/applications/metamta/management/PhabricatorMailManagementListOutboundWorkflow.php +++ b/src/applications/metamta/management/PhabricatorMailManagementListOutboundWorkflow.php @@ -22,7 +22,7 @@ final class PhabricatorMailManagementListOutboundWorkflow public function execute(PhutilArgumentParser $args) { $console = PhutilConsole::getConsole(); - $viewer = PhabricatorUser::getOmnipotentUser(); + $viewer = $this->getViewer(); $mails = id(new PhabricatorMetaMTAMail())->loadAllWhere( '1 = 1 ORDER BY id DESC LIMIT %d', diff --git a/src/applications/metamta/management/PhabricatorMailManagementReceiveTestWorkflow.php b/src/applications/metamta/management/PhabricatorMailManagementReceiveTestWorkflow.php index 9e601b9264..bedf31ac2e 100644 --- a/src/applications/metamta/management/PhabricatorMailManagementReceiveTestWorkflow.php +++ b/src/applications/metamta/management/PhabricatorMailManagementReceiveTestWorkflow.php @@ -42,7 +42,7 @@ final class PhabricatorMailManagementReceiveTestWorkflow } $user = id(new PhabricatorPeopleQuery()) - ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->withUsernames(array($as)) ->executeOne(); if (!$user) { diff --git a/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php b/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php index a61a785e33..aabbff8a75 100644 --- a/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php +++ b/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php @@ -61,7 +61,7 @@ final class PhabricatorMailManagementSendTestWorkflow public function execute(PhutilArgumentParser $args) { $console = PhutilConsole::getConsole(); - $viewer = PhabricatorUser::getOmnipotentUser(); + $viewer = $this->getViewer(); $from = $args->getArg('from'); if ($from) { diff --git a/src/applications/metamta/management/PhabricatorMailManagementWorkflow.php b/src/applications/metamta/management/PhabricatorMailManagementWorkflow.php index ddd4811ae7..0b4662fb54 100644 --- a/src/applications/metamta/management/PhabricatorMailManagementWorkflow.php +++ b/src/applications/metamta/management/PhabricatorMailManagementWorkflow.php @@ -1,10 +1,6 @@ getViewer(); $obj_names = $args->getArg('objects'); if (!$obj_names) { diff --git a/src/applications/policy/management/PhabricatorPolicyManagementUnlockWorkflow.php b/src/applications/policy/management/PhabricatorPolicyManagementUnlockWorkflow.php index f3906eee13..7d0768801f 100644 --- a/src/applications/policy/management/PhabricatorPolicyManagementUnlockWorkflow.php +++ b/src/applications/policy/management/PhabricatorPolicyManagementUnlockWorkflow.php @@ -22,7 +22,7 @@ final class PhabricatorPolicyManagementUnlockWorkflow public function execute(PhutilArgumentParser $args) { $console = PhutilConsole::getConsole(); - $viewer = PhabricatorUser::getOmnipotentUser(); + $viewer = $this->getViewer(); $obj_names = $args->getArg('objects'); if (!$obj_names) { diff --git a/src/applications/policy/management/PhabricatorPolicyManagementWorkflow.php b/src/applications/policy/management/PhabricatorPolicyManagementWorkflow.php index 85d1fe7b3e..4ecac63843 100644 --- a/src/applications/policy/management/PhabricatorPolicyManagementWorkflow.php +++ b/src/applications/policy/management/PhabricatorPolicyManagementWorkflow.php @@ -1,10 +1,6 @@ setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->withUsernames(array($username)) ->executeOne(); diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementListWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementListWorkflow.php index 6ea6992f24..0ee1adbce9 100644 --- a/src/applications/repository/management/PhabricatorRepositoryManagementListWorkflow.php +++ b/src/applications/repository/management/PhabricatorRepositoryManagementListWorkflow.php @@ -14,7 +14,7 @@ final class PhabricatorRepositoryManagementListWorkflow $console = PhutilConsole::getConsole(); $repos = id(new PhabricatorRepositoryQuery()) - ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->execute(); if ($repos) { foreach ($repos as $repo) { diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php index 38cae505c6..82fb82b3e0 100644 --- a/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php +++ b/src/applications/repository/management/PhabricatorRepositoryManagementLookupUsersWorkflow.php @@ -89,7 +89,7 @@ final class PhabricatorRepositoryManagementLookupUsersWorkflow } return id(new PhabricatorHandleQuery()) - ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->withPHIDs(array($phid)) ->executeOne(); } diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementWorkflow.php index 25689c30d4..218b7e36bc 100644 --- a/src/applications/repository/management/PhabricatorRepositoryManagementWorkflow.php +++ b/src/applications/repository/management/PhabricatorRepositoryManagementWorkflow.php @@ -1,11 +1,7 @@ getArg($param); @@ -15,7 +11,7 @@ abstract class PhabricatorRepositoryManagementWorkflow } $repos = id(new PhabricatorRepositoryQuery()) - ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->withCallsigns($callsigns) ->execute(); @@ -37,7 +33,7 @@ abstract class PhabricatorRepositoryManagementWorkflow } $query = id(new DiffusionCommitQuery()) - ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->withIdentifiers($names); $query->execute(); diff --git a/src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php b/src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php index eddc311d38..3eb33c1b2b 100644 --- a/src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php +++ b/src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php @@ -92,7 +92,7 @@ final class PhabricatorSearchManagementIndexWorkflow private function loadPHIDsByNames(array $names) { $query = id(new PhabricatorObjectQuery()) - ->setViewer(PhabricatorUser::getOmnipotentUser()) + ->setViewer($this->getViewer()) ->withNames($names); $query->execute(); $objects = $query->getNamedResults(); diff --git a/src/applications/search/management/PhabricatorSearchManagementWorkflow.php b/src/applications/search/management/PhabricatorSearchManagementWorkflow.php index 4f7fad9ef3..00c3399610 100644 --- a/src/applications/search/management/PhabricatorSearchManagementWorkflow.php +++ b/src/applications/search/management/PhabricatorSearchManagementWorkflow.php @@ -1,13 +1,6 @@ user; } - final public function isExecutable() { - return false; - } - public function setIOChannel(PhutilChannel $channel) { $this->iochannel = $channel; return $this; diff --git a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php index 39767de50c..ccb96b0c54 100644 --- a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php +++ b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php @@ -1,7 +1,7 @@ api; } - public function isExecutable() { - return true; - } - }