From c34de8361984fc67a48b373b615533730e4ca97f Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Fri, 25 Jul 2014 08:20:39 +1000 Subject: [PATCH] Rename policy capabilities Summary: Ref T5655. Rename `PhabricatorPolicyCapability` subclasses for consistency. Test Plan: Browsed a few applications, nothing seemed broken. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin, hach-que Maniphest Tasks: T5655 Differential Revision: https://secure.phabricator.com/D10037 --- src/__phutil_library_map__.php | 152 +++++++++--------- .../PhabricatorCountdownApplication.php | 2 +- ...ricatorCountdownDefaultViewCapability.php} | 2 +- .../storage/PhabricatorCountdown.php | 2 +- .../PhabricatorDifferentialApplication.php | 2 +- ... => DifferentialDefaultViewCapability.php} | 2 +- .../DifferentialRevisionLandController.php | 3 +- .../landing/DifferentialLandingStrategy.php | 23 ++- .../storage/DifferentialRevision.php | 2 +- .../PhabricatorDiffusionApplication.php | 8 +- ...DiffusionCreateRepositoriesCapability.php} | 2 +- ...php => DiffusionDefaultEditCapability.php} | 3 +- ...php => DiffusionDefaultPushCapability.php} | 3 +- ...php => DiffusionDefaultViewCapability.php} | 3 +- ...tyPush.php => DiffusionPushCapability.php} | 3 +- .../DiffusionRepositoryCreateController.php | 5 +- .../DiffusionRepositoryEditMainController.php | 2 +- .../DiffusionRepositoryListController.php | 2 +- .../DiffusionRepositoryNewController.php | 5 +- .../controller/DiffusionServeController.php | 2 +- .../diffusion/ssh/DiffusionSSHWorkflow.php | 2 +- .../PhabricatorDrydockApplication.php | 6 +- ... => DrydockCreateBlueprintsCapability.php} | 2 +- ...t.php => DrydockDefaultEditCapability.php} | 3 +- ...w.php => DrydockDefaultViewCapability.php} | 3 +- .../DrydockBlueprintCreateController.php | 2 +- .../DrydockBlueprintEditController.php | 2 +- .../DrydockBlueprintListController.php | 2 +- .../drydock/storage/DrydockBlueprint.php | 4 +- .../PhabricatorHarbormasterApplication.php | 2 +- ... => HarbormasterManagePlansCapability.php} | 2 +- .../HarbormasterPlanDisableController.php | 2 +- .../HarbormasterPlanEditController.php | 5 +- .../HarbormasterPlanOrderController.php | 2 +- .../HarbormasterPlanRunController.php | 5 +- .../HarbormasterPlanViewController.php | 7 +- .../HarbormasterStepAddController.php | 14 +- .../HarbormasterStepDeleteController.php | 5 +- .../HarbormasterStepEditController.php | 6 +- .../PhabricatorHeraldApplication.php | 2 +- ... => HeraldManageGlobalRulesCapability.php} | 2 +- .../controller/HeraldDisableController.php | 2 +- .../herald/controller/HeraldNewController.php | 3 +- .../controller/HeraldRuleController.php | 4 +- .../herald/storage/HeraldRule.php | 2 +- .../PhabricatorLegalpadApplication.php | 6 +- ... => LegalpadCreateDocumentsCapability.php} | 2 +- ....php => LegalpadDefaultEditCapability.php} | 3 +- ....php => LegalpadDefaultViewCapability.php} | 3 +- .../LegalpadDocumentEditController.php | 2 +- .../LegalpadDocumentListController.php | 2 +- .../legalpad/storage/LegalpadDocument.php | 4 +- .../PhabricatorMacroApplication.php | 2 +- ...p => PhabricatorMacroManageCapability.php} | 2 +- .../PhabricatorMacroAudioController.php | 7 +- .../controller/PhabricatorMacroController.php | 5 +- .../PhabricatorMacroDisableController.php | 4 +- .../PhabricatorMacroEditController.php | 7 +- .../PhabricatorMacroViewController.php | 3 +- .../PhabricatorManiphestApplication.php | 16 +- ...it.php => ManiphestBulkEditCapability.php} | 3 +- ...php => ManiphestDefaultEditCapability.php} | 3 +- ...php => ManiphestDefaultViewCapability.php} | 3 +- ....php => ManiphestEditAssignCapability.php} | 3 +- ...hp => ManiphestEditPoliciesCapability.php} | 2 +- ...hp => ManiphestEditPriorityCapability.php} | 2 +- ...hp => ManiphestEditProjectsCapability.php} | 2 +- ....php => ManiphestEditStatusCapability.php} | 3 +- .../ManiphestBatchEditController.php | 2 +- .../ManiphestTaskDetailController.php | 9 +- .../ManiphestTaskEditController.php | 12 +- .../editor/ManiphestTransactionEditor.php | 12 +- .../query/ManiphestTaskSearchEngine.php | 4 +- .../maniphest/storage/ManiphestTask.php | 4 +- .../PhabricatorNuanceApplication.php | 6 +- ... => NuanceSourceDefaultEditCapability.php} | 2 +- ... => NuanceSourceDefaultViewCapability.php} | 2 +- ...e.php => NuanceSourceManageCapability.php} | 3 +- .../controller/NuanceSourceEditController.php | 2 +- .../nuance/storage/NuanceSource.php | 4 +- .../PhabricatorOAuthServerApplication.php | 2 +- ...torOAuthServerCreateClientsCapability.php} | 2 +- .../PhabricatorOAuthClientEditController.php | 2 +- .../PhabricatorPasteApplication.php | 2 +- ...iew.php => PasteDefaultViewCapability.php} | 3 +- .../paste/storage/PhabricatorPaste.php | 2 +- .../PhabricatorPeopleApplication.php | 3 +- ...> PeopleBrowseUserDirectoryCapability.php} | 5 +- .../PhabricatorPeopleListController.php | 2 +- .../query/PhabricatorPeopleSearchEngine.php | 2 +- .../PhabricatorPholioApplication.php | 4 +- ...it.php => PholioDefaultEditCapability.php} | 3 +- ...ew.php => PholioDefaultViewCapability.php} | 3 +- .../pholio/storage/PholioMock.php | 4 +- .../PhabricatorPhragmentApplication.php | 2 +- ...e.php => PhragmentCanCreateCapability.php} | 3 +- .../controller/PhragmentBrowseController.php | 2 +- .../controller/PhragmentHistoryController.php | 2 +- ...=> PhabricatorPolicyCanEditCapability.php} | 2 +- ...=> PhabricatorPolicyCanJoinCapability.php} | 2 +- ...=> PhabricatorPolicyCanViewCapability.php} | 2 +- .../PhabricatorProjectApplication.php | 2 +- ...hp => ProjectCreateProjectsCapability.php} | 2 +- .../PhabricatorProjectCreateController.php | 5 +- .../PhabricatorProjectListController.php | 2 +- .../ConduitAPI_repository_create_Method.php | 2 +- .../storage/PhabricatorRepository.php | 12 +- .../PhabricatorSlowvoteApplication.php | 2 +- ...bricatorSlowvoteDefaultViewCapability.php} | 2 +- .../storage/PhabricatorSlowvotePoll.php | 6 +- 110 files changed, 258 insertions(+), 301 deletions(-) rename src/applications/countdown/capability/{PhabricatorCountdownCapabilityDefaultView.php => PhabricatorCountdownDefaultViewCapability.php} (85%) rename src/applications/differential/capability/{DifferentialCapabilityDefaultView.php => DifferentialDefaultViewCapability.php} (87%) rename src/applications/diffusion/capability/{DiffusionCapabilityCreateRepositories.php => DiffusionCreateRepositoriesCapability.php} (88%) rename src/applications/diffusion/capability/{DiffusionCapabilityDefaultEdit.php => DiffusionDefaultEditCapability.php} (72%) rename src/applications/diffusion/capability/{DiffusionCapabilityDefaultPush.php => DiffusionDefaultPushCapability.php} (72%) rename src/applications/diffusion/capability/{DiffusionCapabilityDefaultView.php => DiffusionDefaultViewCapability.php} (77%) rename src/applications/diffusion/capability/{DiffusionCapabilityPush.php => DiffusionPushCapability.php} (81%) rename src/applications/drydock/capability/{DrydockCapabilityCreateBlueprints.php => DrydockCreateBlueprintsCapability.php} (89%) rename src/applications/drydock/capability/{DrydockCapabilityDefaultEdit.php => DrydockDefaultEditCapability.php} (73%) rename src/applications/drydock/capability/{DrydockCapabilityDefaultView.php => DrydockDefaultViewCapability.php} (73%) rename src/applications/harbormaster/capability/{HarbormasterCapabilityManagePlans.php => HarbormasterManagePlansCapability.php} (89%) rename src/applications/herald/capability/{HeraldCapabilityManageGlobalRules.php => HeraldManageGlobalRulesCapability.php} (89%) rename src/applications/legalpad/capability/{LegalpadCapabilityCreateDocuments.php => LegalpadCreateDocumentsCapability.php} (89%) rename src/applications/legalpad/capability/{LegalpadCapabilityDefaultEdit.php => LegalpadDefaultEditCapability.php} (72%) rename src/applications/legalpad/capability/{LegalpadCapabilityDefaultView.php => LegalpadDefaultViewCapability.php} (77%) rename src/applications/macro/capability/{PhabricatorMacroCapabilityManage.php => PhabricatorMacroManageCapability.php} (89%) rename src/applications/maniphest/capability/{ManiphestCapabilityBulkEdit.php => ManiphestBulkEditCapability.php} (80%) rename src/applications/maniphest/capability/{ManiphestCapabilityDefaultEdit.php => ManiphestDefaultEditCapability.php} (72%) rename src/applications/maniphest/capability/{ManiphestCapabilityDefaultView.php => ManiphestDefaultViewCapability.php} (77%) rename src/applications/maniphest/capability/{ManiphestCapabilityEditAssign.php => ManiphestEditAssignCapability.php} (80%) rename src/applications/maniphest/capability/{ManiphestCapabilityEditPolicies.php => ManiphestEditPoliciesCapability.php} (89%) rename src/applications/maniphest/capability/{ManiphestCapabilityEditPriority.php => ManiphestEditPriorityCapability.php} (89%) rename src/applications/maniphest/capability/{ManiphestCapabilityEditProjects.php => ManiphestEditProjectsCapability.php} (89%) rename src/applications/maniphest/capability/{ManiphestCapabilityEditStatus.php => ManiphestEditStatusCapability.php} (80%) rename src/applications/nuance/capability/{NuanceCapabilitySourceDefaultEdit.php => NuanceSourceDefaultEditCapability.php} (85%) rename src/applications/nuance/capability/{NuanceCapabilitySourceDefaultView.php => NuanceSourceDefaultViewCapability.php} (88%) rename src/applications/nuance/capability/{NuanceCapabilitySourceManage.php => NuanceSourceManageCapability.php} (80%) rename src/applications/oauthserver/capability/{PhabricatorOAuthServerCapabilityCreateClients.php => PhabricatorOAuthServerCreateClientsCapability.php} (87%) rename src/applications/paste/capability/{PasteCapabilityDefaultView.php => PasteDefaultViewCapability.php} (78%) rename src/applications/people/capability/{PeopleCapabilityBrowseUserDirectory.php => PeopleBrowseUserDirectoryCapability.php} (74%) rename src/applications/pholio/capability/{PholioCapabilityDefaultEdit.php => PholioDefaultEditCapability.php} (72%) rename src/applications/pholio/capability/{PholioCapabilityDefaultView.php => PholioDefaultViewCapability.php} (78%) rename src/applications/phragment/capability/{PhragmentCapabilityCanCreate.php => PhragmentCanCreateCapability.php} (80%) rename src/applications/policy/capability/{PhabricatorPolicyCapabilityCanEdit.php => PhabricatorPolicyCanEditCapability.php} (87%) rename src/applications/policy/capability/{PhabricatorPolicyCapabilityCanJoin.php => PhabricatorPolicyCanJoinCapability.php} (87%) rename src/applications/policy/capability/{PhabricatorPolicyCapabilityCanView.php => PhabricatorPolicyCanViewCapability.php} (89%) rename src/applications/project/capability/{ProjectCapabilityCreateProjects.php => ProjectCreateProjectsCapability.php} (89%) rename src/applications/slowvote/capability/{PhabricatorSlowvoteCapabilityDefaultView.php => PhabricatorSlowvoteDefaultViewCapability.php} (86%) diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index ddd81c9490..3447ea7897 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -335,7 +335,6 @@ phutil_register_library_map(array( 'DifferentialAuthorField' => 'applications/differential/customfield/DifferentialAuthorField.php', 'DifferentialBlameRevisionField' => 'applications/differential/customfield/DifferentialBlameRevisionField.php', 'DifferentialBranchField' => 'applications/differential/customfield/DifferentialBranchField.php', - 'DifferentialCapabilityDefaultView' => 'applications/differential/capability/DifferentialCapabilityDefaultView.php', 'DifferentialChangeType' => 'applications/differential/constants/DifferentialChangeType.php', 'DifferentialChangesSinceLastUpdateField' => 'applications/differential/customfield/DifferentialChangesSinceLastUpdateField.php', 'DifferentialChangeset' => 'applications/differential/storage/DifferentialChangeset.php', @@ -370,6 +369,7 @@ phutil_register_library_map(array( 'DifferentialCustomFieldStorage' => 'applications/differential/storage/DifferentialCustomFieldStorage.php', 'DifferentialCustomFieldStringIndex' => 'applications/differential/storage/DifferentialCustomFieldStringIndex.php', 'DifferentialDAO' => 'applications/differential/storage/DifferentialDAO.php', + 'DifferentialDefaultViewCapability' => 'applications/differential/capability/DifferentialDefaultViewCapability.php', 'DifferentialDependenciesField' => 'applications/differential/customfield/DifferentialDependenciesField.php', 'DifferentialDependsOnField' => 'applications/differential/customfield/DifferentialDependsOnField.php', 'DifferentialDiff' => 'applications/differential/storage/DifferentialDiff.php', @@ -475,11 +475,6 @@ phutil_register_library_map(array( 'DiffusionBrowseResultSet' => 'applications/diffusion/data/DiffusionBrowseResultSet.php', 'DiffusionBrowseSearchController' => 'applications/diffusion/controller/DiffusionBrowseSearchController.php', 'DiffusionBrowseTableView' => 'applications/diffusion/view/DiffusionBrowseTableView.php', - 'DiffusionCapabilityCreateRepositories' => 'applications/diffusion/capability/DiffusionCapabilityCreateRepositories.php', - 'DiffusionCapabilityDefaultEdit' => 'applications/diffusion/capability/DiffusionCapabilityDefaultEdit.php', - 'DiffusionCapabilityDefaultPush' => 'applications/diffusion/capability/DiffusionCapabilityDefaultPush.php', - 'DiffusionCapabilityDefaultView' => 'applications/diffusion/capability/DiffusionCapabilityDefaultView.php', - 'DiffusionCapabilityPush' => 'applications/diffusion/capability/DiffusionCapabilityPush.php', 'DiffusionChangeController' => 'applications/diffusion/controller/DiffusionChangeController.php', 'DiffusionCommentListView' => 'applications/diffusion/view/DiffusionCommentListView.php', 'DiffusionCommentView' => 'applications/diffusion/view/DiffusionCommentView.php', @@ -496,6 +491,10 @@ phutil_register_library_map(array( 'DiffusionCommitRemarkupRule' => 'applications/diffusion/remarkup/DiffusionCommitRemarkupRule.php', 'DiffusionCommitTagsController' => 'applications/diffusion/controller/DiffusionCommitTagsController.php', 'DiffusionController' => 'applications/diffusion/controller/DiffusionController.php', + 'DiffusionCreateRepositoriesCapability' => 'applications/diffusion/capability/DiffusionCreateRepositoriesCapability.php', + 'DiffusionDefaultEditCapability' => 'applications/diffusion/capability/DiffusionDefaultEditCapability.php', + 'DiffusionDefaultPushCapability' => 'applications/diffusion/capability/DiffusionDefaultPushCapability.php', + 'DiffusionDefaultViewCapability' => 'applications/diffusion/capability/DiffusionDefaultViewCapability.php', 'DiffusionDiffController' => 'applications/diffusion/controller/DiffusionDiffController.php', 'DiffusionDoorkeeperCommitFeedStoryPublisher' => 'applications/diffusion/doorkeeper/DiffusionDoorkeeperCommitFeedStoryPublisher.php', 'DiffusionEmptyResultView' => 'applications/diffusion/view/DiffusionEmptyResultView.php', @@ -541,6 +540,7 @@ phutil_register_library_map(array( 'DiffusionPathQueryTestCase' => 'applications/diffusion/query/pathid/__tests__/DiffusionPathQueryTestCase.php', 'DiffusionPathTreeController' => 'applications/diffusion/controller/DiffusionPathTreeController.php', 'DiffusionPathValidateController' => 'applications/diffusion/controller/DiffusionPathValidateController.php', + 'DiffusionPushCapability' => 'applications/diffusion/capability/DiffusionPushCapability.php', 'DiffusionPushEventViewController' => 'applications/diffusion/controller/DiffusionPushEventViewController.php', 'DiffusionPushLogController' => 'applications/diffusion/controller/DiffusionPushLogController.php', 'DiffusionPushLogListController' => 'applications/diffusion/controller/DiffusionPushLogListController.php', @@ -670,14 +670,14 @@ phutil_register_library_map(array( 'DrydockBlueprintTransaction' => 'applications/drydock/storage/DrydockBlueprintTransaction.php', 'DrydockBlueprintTransactionQuery' => 'applications/drydock/query/DrydockBlueprintTransactionQuery.php', 'DrydockBlueprintViewController' => 'applications/drydock/controller/DrydockBlueprintViewController.php', - 'DrydockCapabilityCreateBlueprints' => 'applications/drydock/capability/DrydockCapabilityCreateBlueprints.php', - 'DrydockCapabilityDefaultEdit' => 'applications/drydock/capability/DrydockCapabilityDefaultEdit.php', - 'DrydockCapabilityDefaultView' => 'applications/drydock/capability/DrydockCapabilityDefaultView.php', 'DrydockCommandInterface' => 'applications/drydock/interface/command/DrydockCommandInterface.php', 'DrydockConsoleController' => 'applications/drydock/controller/DrydockConsoleController.php', 'DrydockConstants' => 'applications/drydock/constants/DrydockConstants.php', 'DrydockController' => 'applications/drydock/controller/DrydockController.php', + 'DrydockCreateBlueprintsCapability' => 'applications/drydock/capability/DrydockCreateBlueprintsCapability.php', 'DrydockDAO' => 'applications/drydock/storage/DrydockDAO.php', + 'DrydockDefaultEditCapability' => 'applications/drydock/capability/DrydockDefaultEditCapability.php', + 'DrydockDefaultViewCapability' => 'applications/drydock/capability/DrydockDefaultViewCapability.php', 'DrydockFilesystemInterface' => 'applications/drydock/interface/filesystem/DrydockFilesystemInterface.php', 'DrydockInterface' => 'applications/drydock/interface/DrydockInterface.php', 'DrydockLease' => 'applications/drydock/storage/DrydockLease.php', @@ -778,12 +778,12 @@ phutil_register_library_map(array( 'HarbormasterBuildableTransactionEditor' => 'applications/harbormaster/editor/HarbormasterBuildableTransactionEditor.php', 'HarbormasterBuildableTransactionQuery' => 'applications/harbormaster/query/HarbormasterBuildableTransactionQuery.php', 'HarbormasterBuildableViewController' => 'applications/harbormaster/controller/HarbormasterBuildableViewController.php', - 'HarbormasterCapabilityManagePlans' => 'applications/harbormaster/capability/HarbormasterCapabilityManagePlans.php', 'HarbormasterCommandBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterCommandBuildStepImplementation.php', 'HarbormasterController' => 'applications/harbormaster/controller/HarbormasterController.php', 'HarbormasterDAO' => 'applications/harbormaster/storage/HarbormasterDAO.php', 'HarbormasterHTTPRequestBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php', 'HarbormasterLeaseHostBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterLeaseHostBuildStepImplementation.php', + 'HarbormasterManagePlansCapability' => 'applications/harbormaster/capability/HarbormasterManagePlansCapability.php', 'HarbormasterManagementBuildWorkflow' => 'applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php', 'HarbormasterManagementUpdateWorkflow' => 'applications/harbormaster/management/HarbormasterManagementUpdateWorkflow.php', 'HarbormasterManagementWorkflow' => 'applications/harbormaster/management/HarbormasterManagementWorkflow.php', @@ -811,7 +811,6 @@ phutil_register_library_map(array( 'HeraldAction' => 'applications/herald/storage/HeraldAction.php', 'HeraldAdapter' => 'applications/herald/adapter/HeraldAdapter.php', 'HeraldApplyTranscript' => 'applications/herald/storage/transcript/HeraldApplyTranscript.php', - 'HeraldCapabilityManageGlobalRules' => 'applications/herald/capability/HeraldCapabilityManageGlobalRules.php', 'HeraldCommitAdapter' => 'applications/herald/adapter/HeraldCommitAdapter.php', 'HeraldCondition' => 'applications/herald/storage/HeraldCondition.php', 'HeraldConditionTranscript' => 'applications/herald/storage/transcript/HeraldConditionTranscript.php', @@ -826,6 +825,7 @@ phutil_register_library_map(array( 'HeraldInvalidActionException' => 'applications/herald/engine/exception/HeraldInvalidActionException.php', 'HeraldInvalidConditionException' => 'applications/herald/engine/exception/HeraldInvalidConditionException.php', 'HeraldInvalidFieldException' => 'applications/herald/engine/exception/HeraldInvalidFieldException.php', + 'HeraldManageGlobalRulesCapability' => 'applications/herald/capability/HeraldManageGlobalRulesCapability.php', 'HeraldManiphestTaskAdapter' => 'applications/herald/adapter/HeraldManiphestTaskAdapter.php', 'HeraldNewController' => 'applications/herald/controller/HeraldNewController.php', 'HeraldObjectTranscript' => 'applications/herald/storage/transcript/HeraldObjectTranscript.php', @@ -865,12 +865,12 @@ phutil_register_library_map(array( 'JavelinUIExample' => 'applications/uiexample/examples/JavelinUIExample.php', 'JavelinViewExample' => 'applications/uiexample/examples/JavelinViewExample.php', 'JavelinViewExampleServerView' => 'applications/uiexample/examples/JavelinViewExampleServerView.php', - 'LegalpadCapabilityCreateDocuments' => 'applications/legalpad/capability/LegalpadCapabilityCreateDocuments.php', - 'LegalpadCapabilityDefaultEdit' => 'applications/legalpad/capability/LegalpadCapabilityDefaultEdit.php', - 'LegalpadCapabilityDefaultView' => 'applications/legalpad/capability/LegalpadCapabilityDefaultView.php', 'LegalpadConstants' => 'applications/legalpad/constants/LegalpadConstants.php', 'LegalpadController' => 'applications/legalpad/controller/LegalpadController.php', + 'LegalpadCreateDocumentsCapability' => 'applications/legalpad/capability/LegalpadCreateDocumentsCapability.php', 'LegalpadDAO' => 'applications/legalpad/storage/LegalpadDAO.php', + 'LegalpadDefaultEditCapability' => 'applications/legalpad/capability/LegalpadDefaultEditCapability.php', + 'LegalpadDefaultViewCapability' => 'applications/legalpad/capability/LegalpadDefaultViewCapability.php', 'LegalpadDocument' => 'applications/legalpad/storage/LegalpadDocument.php', 'LegalpadDocumentBody' => 'applications/legalpad/storage/LegalpadDocumentBody.php', 'LegalpadDocumentCommentController' => 'applications/legalpad/controller/LegalpadDocumentCommentController.php', @@ -911,14 +911,7 @@ phutil_register_library_map(array( 'LiskRawMigrationIterator' => 'infrastructure/storage/lisk/LiskRawMigrationIterator.php', 'ManiphestActionMenuEventListener' => 'applications/maniphest/event/ManiphestActionMenuEventListener.php', 'ManiphestBatchEditController' => 'applications/maniphest/controller/ManiphestBatchEditController.php', - 'ManiphestCapabilityBulkEdit' => 'applications/maniphest/capability/ManiphestCapabilityBulkEdit.php', - 'ManiphestCapabilityDefaultEdit' => 'applications/maniphest/capability/ManiphestCapabilityDefaultEdit.php', - 'ManiphestCapabilityDefaultView' => 'applications/maniphest/capability/ManiphestCapabilityDefaultView.php', - 'ManiphestCapabilityEditAssign' => 'applications/maniphest/capability/ManiphestCapabilityEditAssign.php', - 'ManiphestCapabilityEditPolicies' => 'applications/maniphest/capability/ManiphestCapabilityEditPolicies.php', - 'ManiphestCapabilityEditPriority' => 'applications/maniphest/capability/ManiphestCapabilityEditPriority.php', - 'ManiphestCapabilityEditProjects' => 'applications/maniphest/capability/ManiphestCapabilityEditProjects.php', - 'ManiphestCapabilityEditStatus' => 'applications/maniphest/capability/ManiphestCapabilityEditStatus.php', + 'ManiphestBulkEditCapability' => 'applications/maniphest/capability/ManiphestBulkEditCapability.php', 'ManiphestConfiguredCustomField' => 'applications/maniphest/field/ManiphestConfiguredCustomField.php', 'ManiphestConstants' => 'applications/maniphest/constants/ManiphestConstants.php', 'ManiphestController' => 'applications/maniphest/controller/ManiphestController.php', @@ -930,6 +923,13 @@ phutil_register_library_map(array( 'ManiphestCustomFieldStorage' => 'applications/maniphest/storage/ManiphestCustomFieldStorage.php', 'ManiphestCustomFieldStringIndex' => 'applications/maniphest/storage/ManiphestCustomFieldStringIndex.php', 'ManiphestDAO' => 'applications/maniphest/storage/ManiphestDAO.php', + 'ManiphestDefaultEditCapability' => 'applications/maniphest/capability/ManiphestDefaultEditCapability.php', + 'ManiphestDefaultViewCapability' => 'applications/maniphest/capability/ManiphestDefaultViewCapability.php', + 'ManiphestEditAssignCapability' => 'applications/maniphest/capability/ManiphestEditAssignCapability.php', + 'ManiphestEditPoliciesCapability' => 'applications/maniphest/capability/ManiphestEditPoliciesCapability.php', + 'ManiphestEditPriorityCapability' => 'applications/maniphest/capability/ManiphestEditPriorityCapability.php', + 'ManiphestEditProjectsCapability' => 'applications/maniphest/capability/ManiphestEditProjectsCapability.php', + 'ManiphestEditStatusCapability' => 'applications/maniphest/capability/ManiphestEditStatusCapability.php', 'ManiphestExcelDefaultFormat' => 'applications/maniphest/export/ManiphestExcelDefaultFormat.php', 'ManiphestExcelFormat' => 'applications/maniphest/export/ManiphestExcelFormat.php', 'ManiphestExportController' => 'applications/maniphest/controller/ManiphestExportController.php', @@ -974,9 +974,6 @@ phutil_register_library_map(array( 'MetaMTAMailSentGarbageCollector' => 'applications/metamta/garbagecollector/MetaMTAMailSentGarbageCollector.php', 'MetaMTANotificationType' => 'applications/metamta/constants/MetaMTANotificationType.php', 'MetaMTAReceivedMailStatus' => 'applications/metamta/constants/MetaMTAReceivedMailStatus.php', - 'NuanceCapabilitySourceDefaultEdit' => 'applications/nuance/capability/NuanceCapabilitySourceDefaultEdit.php', - 'NuanceCapabilitySourceDefaultView' => 'applications/nuance/capability/NuanceCapabilitySourceDefaultView.php', - 'NuanceCapabilitySourceManage' => 'applications/nuance/capability/NuanceCapabilitySourceManage.php', 'NuanceConstants' => 'applications/nuance/constants/NuanceConstants.php', 'NuanceController' => 'applications/nuance/controller/NuanceController.php', 'NuanceDAO' => 'applications/nuance/storage/NuanceDAO.php', @@ -1012,9 +1009,12 @@ phutil_register_library_map(array( 'NuanceRequestorTransactionQuery' => 'applications/nuance/query/NuanceRequestorTransactionQuery.php', 'NuanceRequestorViewController' => 'applications/nuance/controller/NuanceRequestorViewController.php', 'NuanceSource' => 'applications/nuance/storage/NuanceSource.php', + 'NuanceSourceDefaultEditCapability' => 'applications/nuance/capability/NuanceSourceDefaultEditCapability.php', + 'NuanceSourceDefaultViewCapability' => 'applications/nuance/capability/NuanceSourceDefaultViewCapability.php', 'NuanceSourceDefinition' => 'applications/nuance/source/NuanceSourceDefinition.php', 'NuanceSourceEditController' => 'applications/nuance/controller/NuanceSourceEditController.php', 'NuanceSourceEditor' => 'applications/nuance/editor/NuanceSourceEditor.php', + 'NuanceSourceManageCapability' => 'applications/nuance/capability/NuanceSourceManageCapability.php', 'NuanceSourcePHIDType' => 'applications/nuance/phid/NuanceSourcePHIDType.php', 'NuanceSourceQuery' => 'applications/nuance/query/NuanceSourceQuery.php', 'NuanceSourceTransaction' => 'applications/nuance/storage/NuanceSourceTransaction.php', @@ -1112,12 +1112,12 @@ phutil_register_library_map(array( 'PassphraseRemarkupRule' => 'applications/passphrase/remarkup/PassphraseRemarkupRule.php', 'PassphraseSSHKey' => 'applications/passphrase/keys/PassphraseSSHKey.php', 'PassphraseSecret' => 'applications/passphrase/storage/PassphraseSecret.php', - 'PasteCapabilityDefaultView' => 'applications/paste/capability/PasteCapabilityDefaultView.php', 'PasteCreateMailReceiver' => 'applications/paste/mail/PasteCreateMailReceiver.php', + 'PasteDefaultViewCapability' => 'applications/paste/capability/PasteDefaultViewCapability.php', 'PasteEmbedView' => 'applications/paste/view/PasteEmbedView.php', 'PasteMockMailReceiver' => 'applications/paste/mail/PasteMockMailReceiver.php', 'PasteReplyHandler' => 'applications/paste/mail/PasteReplyHandler.php', - 'PeopleCapabilityBrowseUserDirectory' => 'applications/people/capability/PeopleCapabilityBrowseUserDirectory.php', + 'PeopleBrowseUserDirectoryCapability' => 'applications/people/capability/PeopleBrowseUserDirectoryCapability.php', 'PeopleUserLogGarbageCollector' => 'applications/people/garbagecollector/PeopleUserLogGarbageCollector.php', 'Phabricator404Controller' => 'applications/base/controller/Phabricator404Controller.php', 'PhabricatorAWSConfigOptions' => 'applications/config/option/PhabricatorAWSConfigOptions.php', @@ -1376,10 +1376,10 @@ phutil_register_library_map(array( 'PhabricatorCoreConfigOptions' => 'applications/config/option/PhabricatorCoreConfigOptions.php', 'PhabricatorCountdown' => 'applications/countdown/storage/PhabricatorCountdown.php', 'PhabricatorCountdownApplication' => 'applications/countdown/application/PhabricatorCountdownApplication.php', - 'PhabricatorCountdownCapabilityDefaultView' => 'applications/countdown/capability/PhabricatorCountdownCapabilityDefaultView.php', 'PhabricatorCountdownController' => 'applications/countdown/controller/PhabricatorCountdownController.php', 'PhabricatorCountdownCountdownPHIDType' => 'applications/countdown/phid/PhabricatorCountdownCountdownPHIDType.php', 'PhabricatorCountdownDAO' => 'applications/countdown/storage/PhabricatorCountdownDAO.php', + 'PhabricatorCountdownDefaultViewCapability' => 'applications/countdown/capability/PhabricatorCountdownDefaultViewCapability.php', 'PhabricatorCountdownDeleteController' => 'applications/countdown/controller/PhabricatorCountdownDeleteController.php', 'PhabricatorCountdownEditController' => 'applications/countdown/controller/PhabricatorCountdownEditController.php', 'PhabricatorCountdownListController' => 'applications/countdown/controller/PhabricatorCountdownListController.php', @@ -1686,7 +1686,6 @@ phutil_register_library_map(array( 'PhabricatorLogoutController' => 'applications/auth/controller/PhabricatorLogoutController.php', 'PhabricatorMacroApplication' => 'applications/macro/application/PhabricatorMacroApplication.php', 'PhabricatorMacroAudioController' => 'applications/macro/controller/PhabricatorMacroAudioController.php', - 'PhabricatorMacroCapabilityManage' => 'applications/macro/capability/PhabricatorMacroCapabilityManage.php', 'PhabricatorMacroCommentController' => 'applications/macro/controller/PhabricatorMacroCommentController.php', 'PhabricatorMacroConfigOptions' => 'applications/macro/config/PhabricatorMacroConfigOptions.php', 'PhabricatorMacroController' => 'applications/macro/controller/PhabricatorMacroController.php', @@ -1697,6 +1696,7 @@ phutil_register_library_map(array( 'PhabricatorMacroListController' => 'applications/macro/controller/PhabricatorMacroListController.php', 'PhabricatorMacroMacroPHIDType' => 'applications/macro/phid/PhabricatorMacroMacroPHIDType.php', 'PhabricatorMacroMailReceiver' => 'applications/macro/mail/PhabricatorMacroMailReceiver.php', + 'PhabricatorMacroManageCapability' => 'applications/macro/capability/PhabricatorMacroManageCapability.php', 'PhabricatorMacroMemeController' => 'applications/macro/controller/PhabricatorMacroMemeController.php', 'PhabricatorMacroMemeDialogController' => 'applications/macro/controller/PhabricatorMacroMemeDialogController.php', 'PhabricatorMacroQuery' => 'applications/macro/query/PhabricatorMacroQuery.php', @@ -1811,13 +1811,13 @@ phutil_register_library_map(array( 'PhabricatorOAuthServerAuthController' => 'applications/oauthserver/controller/PhabricatorOAuthServerAuthController.php', 'PhabricatorOAuthServerAuthorizationCode' => 'applications/oauthserver/storage/PhabricatorOAuthServerAuthorizationCode.php', 'PhabricatorOAuthServerAuthorizationsSettingsPanel' => 'applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php', - 'PhabricatorOAuthServerCapabilityCreateClients' => 'applications/oauthserver/capability/PhabricatorOAuthServerCapabilityCreateClients.php', 'PhabricatorOAuthServerClient' => 'applications/oauthserver/storage/PhabricatorOAuthServerClient.php', 'PhabricatorOAuthServerClientAuthorizationPHIDType' => 'applications/oauthserver/phid/PhabricatorOAuthServerClientAuthorizationPHIDType.php', 'PhabricatorOAuthServerClientPHIDType' => 'applications/oauthserver/phid/PhabricatorOAuthServerClientPHIDType.php', 'PhabricatorOAuthServerClientQuery' => 'applications/oauthserver/query/PhabricatorOAuthServerClientQuery.php', 'PhabricatorOAuthServerClientSearchEngine' => 'applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php', 'PhabricatorOAuthServerController' => 'applications/oauthserver/controller/PhabricatorOAuthServerController.php', + 'PhabricatorOAuthServerCreateClientsCapability' => 'applications/oauthserver/capability/PhabricatorOAuthServerCreateClientsCapability.php', 'PhabricatorOAuthServerDAO' => 'applications/oauthserver/storage/PhabricatorOAuthServerDAO.php', 'PhabricatorOAuthServerScope' => 'applications/oauthserver/PhabricatorOAuthServerScope.php', 'PhabricatorOAuthServerTestCase' => 'applications/oauthserver/__tests__/PhabricatorOAuthServerTestCase.php', @@ -1928,10 +1928,10 @@ phutil_register_library_map(array( 'PhabricatorPolicyApplication' => 'applications/policy/application/PhabricatorPolicyApplication.php', 'PhabricatorPolicyAwareQuery' => 'infrastructure/query/policy/PhabricatorPolicyAwareQuery.php', 'PhabricatorPolicyAwareTestQuery' => 'applications/policy/__tests__/PhabricatorPolicyAwareTestQuery.php', + 'PhabricatorPolicyCanEditCapability' => 'applications/policy/capability/PhabricatorPolicyCanEditCapability.php', + 'PhabricatorPolicyCanJoinCapability' => 'applications/policy/capability/PhabricatorPolicyCanJoinCapability.php', + 'PhabricatorPolicyCanViewCapability' => 'applications/policy/capability/PhabricatorPolicyCanViewCapability.php', 'PhabricatorPolicyCapability' => 'applications/policy/capability/PhabricatorPolicyCapability.php', - 'PhabricatorPolicyCapabilityCanEdit' => 'applications/policy/capability/PhabricatorPolicyCapabilityCanEdit.php', - 'PhabricatorPolicyCapabilityCanJoin' => 'applications/policy/capability/PhabricatorPolicyCapabilityCanJoin.php', - 'PhabricatorPolicyCapabilityCanView' => 'applications/policy/capability/PhabricatorPolicyCapabilityCanView.php', 'PhabricatorPolicyConfigOptions' => 'applications/policy/config/PhabricatorPolicyConfigOptions.php', 'PhabricatorPolicyConstants' => 'applications/policy/constants/PhabricatorPolicyConstants.php', 'PhabricatorPolicyController' => 'applications/policy/controller/PhabricatorPolicyController.php', @@ -2217,13 +2217,13 @@ phutil_register_library_map(array( 'PhabricatorSetupIssueExample' => 'applications/uiexample/examples/PhabricatorSetupIssueExample.php', 'PhabricatorSetupIssueView' => 'applications/config/view/PhabricatorSetupIssueView.php', 'PhabricatorSlowvoteApplication' => 'applications/slowvote/application/PhabricatorSlowvoteApplication.php', - 'PhabricatorSlowvoteCapabilityDefaultView' => 'applications/slowvote/capability/PhabricatorSlowvoteCapabilityDefaultView.php', 'PhabricatorSlowvoteChoice' => 'applications/slowvote/storage/PhabricatorSlowvoteChoice.php', 'PhabricatorSlowvoteCloseController' => 'applications/slowvote/controller/PhabricatorSlowvoteCloseController.php', 'PhabricatorSlowvoteComment' => 'applications/slowvote/storage/PhabricatorSlowvoteComment.php', 'PhabricatorSlowvoteCommentController' => 'applications/slowvote/controller/PhabricatorSlowvoteCommentController.php', 'PhabricatorSlowvoteController' => 'applications/slowvote/controller/PhabricatorSlowvoteController.php', 'PhabricatorSlowvoteDAO' => 'applications/slowvote/storage/PhabricatorSlowvoteDAO.php', + 'PhabricatorSlowvoteDefaultViewCapability' => 'applications/slowvote/capability/PhabricatorSlowvoteDefaultViewCapability.php', 'PhabricatorSlowvoteEditController' => 'applications/slowvote/controller/PhabricatorSlowvoteEditController.php', 'PhabricatorSlowvoteEditor' => 'applications/slowvote/editor/PhabricatorSlowvoteEditor.php', 'PhabricatorSlowvoteListController' => 'applications/slowvote/controller/PhabricatorSlowvoteListController.php', @@ -2453,11 +2453,11 @@ phutil_register_library_map(array( 'PhluxVariableQuery' => 'applications/phlux/query/PhluxVariableQuery.php', 'PhluxViewController' => 'applications/phlux/controller/PhluxViewController.php', 'PholioActionMenuEventListener' => 'applications/pholio/event/PholioActionMenuEventListener.php', - 'PholioCapabilityDefaultEdit' => 'applications/pholio/capability/PholioCapabilityDefaultEdit.php', - 'PholioCapabilityDefaultView' => 'applications/pholio/capability/PholioCapabilityDefaultView.php', 'PholioConstants' => 'applications/pholio/constants/PholioConstants.php', 'PholioController' => 'applications/pholio/controller/PholioController.php', 'PholioDAO' => 'applications/pholio/storage/PholioDAO.php', + 'PholioDefaultEditCapability' => 'applications/pholio/capability/PholioDefaultEditCapability.php', + 'PholioDefaultViewCapability' => 'applications/pholio/capability/PholioDefaultViewCapability.php', 'PholioImage' => 'applications/pholio/storage/PholioImage.php', 'PholioImagePHIDType' => 'applications/pholio/phid/PholioImagePHIDType.php', 'PholioImageQuery' => 'applications/pholio/query/PholioImageQuery.php', @@ -2538,7 +2538,7 @@ phutil_register_library_map(array( 'PhortuneTestPaymentProvider' => 'applications/phortune/provider/PhortuneTestPaymentProvider.php', 'PhortuneWePayPaymentProvider' => 'applications/phortune/provider/PhortuneWePayPaymentProvider.php', 'PhragmentBrowseController' => 'applications/phragment/controller/PhragmentBrowseController.php', - 'PhragmentCapabilityCanCreate' => 'applications/phragment/capability/PhragmentCapabilityCanCreate.php', + 'PhragmentCanCreateCapability' => 'applications/phragment/capability/PhragmentCanCreateCapability.php', 'PhragmentController' => 'applications/phragment/controller/PhragmentController.php', 'PhragmentCreateController' => 'applications/phragment/controller/PhragmentCreateController.php', 'PhragmentDAO' => 'applications/phragment/storage/PhragmentDAO.php', @@ -2647,7 +2647,7 @@ phutil_register_library_map(array( 'PonderVoteEditor' => 'applications/ponder/editor/PonderVoteEditor.php', 'PonderVoteSaveController' => 'applications/ponder/controller/PonderVoteSaveController.php', 'ProjectBoardTaskCard' => 'applications/project/view/ProjectBoardTaskCard.php', - 'ProjectCapabilityCreateProjects' => 'applications/project/capability/ProjectCapabilityCreateProjects.php', + 'ProjectCreateProjectsCapability' => 'applications/project/capability/ProjectCreateProjectsCapability.php', 'ProjectRemarkupRule' => 'applications/project/remarkup/ProjectRemarkupRule.php', 'QueryFormattingTestCase' => 'infrastructure/storage/__tests__/QueryFormattingTestCase.php', 'ReleephAuthorFieldSpecification' => 'applications/releeph/field/specification/ReleephAuthorFieldSpecification.php', @@ -3060,7 +3060,6 @@ phutil_register_library_map(array( 'DifferentialAuthorField' => 'DifferentialCustomField', 'DifferentialBlameRevisionField' => 'DifferentialStoredCustomField', 'DifferentialBranchField' => 'DifferentialCustomField', - 'DifferentialCapabilityDefaultView' => 'PhabricatorPolicyCapability', 'DifferentialChangesSinceLastUpdateField' => 'DifferentialCustomField', 'DifferentialChangeset' => array( 'DifferentialDAO', @@ -3093,6 +3092,7 @@ phutil_register_library_map(array( 'DifferentialCustomFieldStorage' => 'PhabricatorCustomFieldStorage', 'DifferentialCustomFieldStringIndex' => 'PhabricatorCustomFieldStringIndexStorage', 'DifferentialDAO' => 'PhabricatorLiskDAO', + 'DifferentialDefaultViewCapability' => 'PhabricatorPolicyCapability', 'DifferentialDependenciesField' => 'DifferentialCustomField', 'DifferentialDependsOnField' => 'DifferentialCustomField', 'DifferentialDiff' => array( @@ -3206,11 +3206,6 @@ phutil_register_library_map(array( 'DiffusionBrowseMainController' => 'DiffusionBrowseController', 'DiffusionBrowseSearchController' => 'DiffusionBrowseController', 'DiffusionBrowseTableView' => 'DiffusionView', - 'DiffusionCapabilityCreateRepositories' => 'PhabricatorPolicyCapability', - 'DiffusionCapabilityDefaultEdit' => 'PhabricatorPolicyCapability', - 'DiffusionCapabilityDefaultPush' => 'PhabricatorPolicyCapability', - 'DiffusionCapabilityDefaultView' => 'PhabricatorPolicyCapability', - 'DiffusionCapabilityPush' => 'PhabricatorPolicyCapability', 'DiffusionChangeController' => 'DiffusionController', 'DiffusionCommentListView' => 'AphrontView', 'DiffusionCommentView' => 'AphrontView', @@ -3227,6 +3222,10 @@ phutil_register_library_map(array( 'DiffusionCommitRemarkupRule' => 'PhabricatorRemarkupRuleObject', 'DiffusionCommitTagsController' => 'DiffusionController', 'DiffusionController' => 'PhabricatorController', + 'DiffusionCreateRepositoriesCapability' => 'PhabricatorPolicyCapability', + 'DiffusionDefaultEditCapability' => 'PhabricatorPolicyCapability', + 'DiffusionDefaultPushCapability' => 'PhabricatorPolicyCapability', + 'DiffusionDefaultViewCapability' => 'PhabricatorPolicyCapability', 'DiffusionDiffController' => 'DiffusionController', 'DiffusionDoorkeeperCommitFeedStoryPublisher' => 'DoorkeeperFeedStoryPublisher', 'DiffusionEmptyResultView' => 'DiffusionView', @@ -3264,6 +3263,7 @@ phutil_register_library_map(array( 'DiffusionPathQueryTestCase' => 'PhabricatorTestCase', 'DiffusionPathTreeController' => 'DiffusionController', 'DiffusionPathValidateController' => 'DiffusionController', + 'DiffusionPushCapability' => 'PhabricatorPolicyCapability', 'DiffusionPushEventViewController' => 'DiffusionPushLogController', 'DiffusionPushLogController' => 'DiffusionController', 'DiffusionPushLogListController' => 'DiffusionPushLogController', @@ -3393,13 +3393,13 @@ phutil_register_library_map(array( 'DrydockBlueprintTransaction' => 'PhabricatorApplicationTransaction', 'DrydockBlueprintTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'DrydockBlueprintViewController' => 'DrydockBlueprintController', - 'DrydockCapabilityCreateBlueprints' => 'PhabricatorPolicyCapability', - 'DrydockCapabilityDefaultEdit' => 'PhabricatorPolicyCapability', - 'DrydockCapabilityDefaultView' => 'PhabricatorPolicyCapability', 'DrydockCommandInterface' => 'DrydockInterface', 'DrydockConsoleController' => 'DrydockController', 'DrydockController' => 'PhabricatorController', + 'DrydockCreateBlueprintsCapability' => 'PhabricatorPolicyCapability', 'DrydockDAO' => 'PhabricatorLiskDAO', + 'DrydockDefaultEditCapability' => 'PhabricatorPolicyCapability', + 'DrydockDefaultViewCapability' => 'PhabricatorPolicyCapability', 'DrydockFilesystemInterface' => 'DrydockInterface', 'DrydockLease' => array( 'DrydockDAO', @@ -3536,12 +3536,12 @@ phutil_register_library_map(array( 'HarbormasterBuildableTransactionEditor' => 'PhabricatorApplicationTransactionEditor', 'HarbormasterBuildableTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'HarbormasterBuildableViewController' => 'HarbormasterController', - 'HarbormasterCapabilityManagePlans' => 'PhabricatorPolicyCapability', 'HarbormasterCommandBuildStepImplementation' => 'HarbormasterBuildStepImplementation', 'HarbormasterController' => 'PhabricatorController', 'HarbormasterDAO' => 'PhabricatorLiskDAO', 'HarbormasterHTTPRequestBuildStepImplementation' => 'HarbormasterBuildStepImplementation', 'HarbormasterLeaseHostBuildStepImplementation' => 'HarbormasterBuildStepImplementation', + 'HarbormasterManagePlansCapability' => 'PhabricatorPolicyCapability', 'HarbormasterManagementBuildWorkflow' => 'HarbormasterManagementWorkflow', 'HarbormasterManagementUpdateWorkflow' => 'HarbormasterManagementWorkflow', 'HarbormasterManagementWorkflow' => 'PhabricatorManagementWorkflow', @@ -3568,7 +3568,6 @@ phutil_register_library_map(array( 'HarbormasterWorker' => 'PhabricatorWorker', 'HeraldAction' => 'HeraldDAO', 'HeraldApplyTranscript' => 'HeraldDAO', - 'HeraldCapabilityManageGlobalRules' => 'PhabricatorPolicyCapability', 'HeraldCommitAdapter' => 'HeraldAdapter', 'HeraldCondition' => 'HeraldDAO', 'HeraldController' => 'PhabricatorController', @@ -3579,6 +3578,7 @@ phutil_register_library_map(array( 'HeraldInvalidActionException' => 'Exception', 'HeraldInvalidConditionException' => 'Exception', 'HeraldInvalidFieldException' => 'Exception', + 'HeraldManageGlobalRulesCapability' => 'PhabricatorPolicyCapability', 'HeraldManiphestTaskAdapter' => 'HeraldAdapter', 'HeraldNewController' => 'HeraldController', 'HeraldPholioMockAdapter' => 'HeraldAdapter', @@ -3621,11 +3621,11 @@ phutil_register_library_map(array( 'JavelinUIExample' => 'PhabricatorUIExample', 'JavelinViewExample' => 'PhabricatorUIExample', 'JavelinViewExampleServerView' => 'AphrontView', - 'LegalpadCapabilityCreateDocuments' => 'PhabricatorPolicyCapability', - 'LegalpadCapabilityDefaultEdit' => 'PhabricatorPolicyCapability', - 'LegalpadCapabilityDefaultView' => 'PhabricatorPolicyCapability', 'LegalpadController' => 'PhabricatorController', + 'LegalpadCreateDocumentsCapability' => 'PhabricatorPolicyCapability', 'LegalpadDAO' => 'PhabricatorLiskDAO', + 'LegalpadDefaultEditCapability' => 'PhabricatorPolicyCapability', + 'LegalpadDefaultViewCapability' => 'PhabricatorPolicyCapability', 'LegalpadDocument' => array( 'LegalpadDAO', 'PhabricatorPolicyInterface', @@ -3676,14 +3676,7 @@ phutil_register_library_map(array( 'LiskRawMigrationIterator' => 'PhutilBufferedIterator', 'ManiphestActionMenuEventListener' => 'PhabricatorEventListener', 'ManiphestBatchEditController' => 'ManiphestController', - 'ManiphestCapabilityBulkEdit' => 'PhabricatorPolicyCapability', - 'ManiphestCapabilityDefaultEdit' => 'PhabricatorPolicyCapability', - 'ManiphestCapabilityDefaultView' => 'PhabricatorPolicyCapability', - 'ManiphestCapabilityEditAssign' => 'PhabricatorPolicyCapability', - 'ManiphestCapabilityEditPolicies' => 'PhabricatorPolicyCapability', - 'ManiphestCapabilityEditPriority' => 'PhabricatorPolicyCapability', - 'ManiphestCapabilityEditProjects' => 'PhabricatorPolicyCapability', - 'ManiphestCapabilityEditStatus' => 'PhabricatorPolicyCapability', + 'ManiphestBulkEditCapability' => 'PhabricatorPolicyCapability', 'ManiphestConfiguredCustomField' => array( 'ManiphestCustomField', 'PhabricatorStandardCustomFieldInterface', @@ -3697,6 +3690,13 @@ phutil_register_library_map(array( 'ManiphestCustomFieldStorage' => 'PhabricatorCustomFieldStorage', 'ManiphestCustomFieldStringIndex' => 'PhabricatorCustomFieldStringIndexStorage', 'ManiphestDAO' => 'PhabricatorLiskDAO', + 'ManiphestDefaultEditCapability' => 'PhabricatorPolicyCapability', + 'ManiphestDefaultViewCapability' => 'PhabricatorPolicyCapability', + 'ManiphestEditAssignCapability' => 'PhabricatorPolicyCapability', + 'ManiphestEditPoliciesCapability' => 'PhabricatorPolicyCapability', + 'ManiphestEditPriorityCapability' => 'PhabricatorPolicyCapability', + 'ManiphestEditProjectsCapability' => 'PhabricatorPolicyCapability', + 'ManiphestEditStatusCapability' => 'PhabricatorPolicyCapability', 'ManiphestExcelDefaultFormat' => 'ManiphestExcelFormat', 'ManiphestExportController' => 'ManiphestController', 'ManiphestHovercardEventListener' => 'PhabricatorEventListener', @@ -3749,9 +3749,6 @@ phutil_register_library_map(array( 'MetaMTAMailSentGarbageCollector' => 'PhabricatorGarbageCollector', 'MetaMTANotificationType' => 'MetaMTAConstants', 'MetaMTAReceivedMailStatus' => 'MetaMTAConstants', - 'NuanceCapabilitySourceDefaultEdit' => 'PhabricatorPolicyCapability', - 'NuanceCapabilitySourceDefaultView' => 'PhabricatorPolicyCapability', - 'NuanceCapabilitySourceManage' => 'PhabricatorPolicyCapability', 'NuanceController' => 'PhabricatorController', 'NuanceDAO' => 'PhabricatorLiskDAO', 'NuanceItem' => array( @@ -3795,9 +3792,12 @@ phutil_register_library_map(array( 'NuanceDAO', 'PhabricatorPolicyInterface', ), + 'NuanceSourceDefaultEditCapability' => 'PhabricatorPolicyCapability', + 'NuanceSourceDefaultViewCapability' => 'PhabricatorPolicyCapability', 'NuanceSourceDefinition' => 'Phobject', 'NuanceSourceEditController' => 'NuanceController', 'NuanceSourceEditor' => 'PhabricatorApplicationTransactionEditor', + 'NuanceSourceManageCapability' => 'PhabricatorPolicyCapability', 'NuanceSourcePHIDType' => 'PhabricatorPHIDType', 'NuanceSourceQuery' => 'NuanceQuery', 'NuanceSourceTransaction' => 'NuanceTransaction', @@ -3897,12 +3897,12 @@ phutil_register_library_map(array( 'PassphraseRemarkupRule' => 'PhabricatorRemarkupRuleObject', 'PassphraseSSHKey' => 'PassphraseAbstractKey', 'PassphraseSecret' => 'PassphraseDAO', - 'PasteCapabilityDefaultView' => 'PhabricatorPolicyCapability', 'PasteCreateMailReceiver' => 'PhabricatorMailReceiver', + 'PasteDefaultViewCapability' => 'PhabricatorPolicyCapability', 'PasteEmbedView' => 'AphrontView', 'PasteMockMailReceiver' => 'PhabricatorObjectMailReceiver', 'PasteReplyHandler' => 'PhabricatorMailReplyHandler', - 'PeopleCapabilityBrowseUserDirectory' => 'PhabricatorPolicyCapability', + 'PeopleBrowseUserDirectoryCapability' => 'PhabricatorPolicyCapability', 'PeopleUserLogGarbageCollector' => 'PhabricatorGarbageCollector', 'Phabricator404Controller' => 'PhabricatorController', 'PhabricatorAWSConfigOptions' => 'PhabricatorApplicationConfigOptions', @@ -4187,10 +4187,10 @@ phutil_register_library_map(array( 'PhabricatorPolicyInterface', ), 'PhabricatorCountdownApplication' => 'PhabricatorApplication', - 'PhabricatorCountdownCapabilityDefaultView' => 'PhabricatorPolicyCapability', 'PhabricatorCountdownController' => 'PhabricatorController', 'PhabricatorCountdownCountdownPHIDType' => 'PhabricatorPHIDType', 'PhabricatorCountdownDAO' => 'PhabricatorLiskDAO', + 'PhabricatorCountdownDefaultViewCapability' => 'PhabricatorPolicyCapability', 'PhabricatorCountdownDeleteController' => 'PhabricatorCountdownController', 'PhabricatorCountdownEditController' => 'PhabricatorCountdownController', 'PhabricatorCountdownListController' => 'PhabricatorCountdownController', @@ -4504,7 +4504,6 @@ phutil_register_library_map(array( 'PhabricatorLogoutController' => 'PhabricatorAuthController', 'PhabricatorMacroApplication' => 'PhabricatorApplication', 'PhabricatorMacroAudioController' => 'PhabricatorMacroController', - 'PhabricatorMacroCapabilityManage' => 'PhabricatorPolicyCapability', 'PhabricatorMacroCommentController' => 'PhabricatorMacroController', 'PhabricatorMacroConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorMacroController' => 'PhabricatorController', @@ -4515,6 +4514,7 @@ phutil_register_library_map(array( 'PhabricatorMacroListController' => 'PhabricatorMacroController', 'PhabricatorMacroMacroPHIDType' => 'PhabricatorPHIDType', 'PhabricatorMacroMailReceiver' => 'PhabricatorObjectMailReceiver', + 'PhabricatorMacroManageCapability' => 'PhabricatorPolicyCapability', 'PhabricatorMacroMemeController' => 'PhabricatorMacroController', 'PhabricatorMacroMemeDialogController' => 'PhabricatorMacroController', 'PhabricatorMacroQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', @@ -4625,7 +4625,6 @@ phutil_register_library_map(array( 'PhabricatorOAuthServerAuthController' => 'PhabricatorAuthController', 'PhabricatorOAuthServerAuthorizationCode' => 'PhabricatorOAuthServerDAO', 'PhabricatorOAuthServerAuthorizationsSettingsPanel' => 'PhabricatorSettingsPanel', - 'PhabricatorOAuthServerCapabilityCreateClients' => 'PhabricatorPolicyCapability', 'PhabricatorOAuthServerClient' => array( 'PhabricatorOAuthServerDAO', 'PhabricatorPolicyInterface', @@ -4635,6 +4634,7 @@ phutil_register_library_map(array( 'PhabricatorOAuthServerClientQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorOAuthServerClientSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorOAuthServerController' => 'PhabricatorController', + 'PhabricatorOAuthServerCreateClientsCapability' => 'PhabricatorPolicyCapability', 'PhabricatorOAuthServerDAO' => 'PhabricatorLiskDAO', 'PhabricatorOAuthServerTestCase' => 'PhabricatorTestCase', 'PhabricatorOAuthServerTestController' => 'PhabricatorOAuthServerController', @@ -4748,10 +4748,10 @@ phutil_register_library_map(array( 'PhabricatorPolicyApplication' => 'PhabricatorApplication', 'PhabricatorPolicyAwareQuery' => 'PhabricatorOffsetPagedQuery', 'PhabricatorPolicyAwareTestQuery' => 'PhabricatorPolicyAwareQuery', + 'PhabricatorPolicyCanEditCapability' => 'PhabricatorPolicyCapability', + 'PhabricatorPolicyCanJoinCapability' => 'PhabricatorPolicyCapability', + 'PhabricatorPolicyCanViewCapability' => 'PhabricatorPolicyCapability', 'PhabricatorPolicyCapability' => 'Phobject', - 'PhabricatorPolicyCapabilityCanEdit' => 'PhabricatorPolicyCapability', - 'PhabricatorPolicyCapabilityCanJoin' => 'PhabricatorPolicyCapability', - 'PhabricatorPolicyCapabilityCanView' => 'PhabricatorPolicyCapability', 'PhabricatorPolicyConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorPolicyController' => 'PhabricatorController', 'PhabricatorPolicyDAO' => 'PhabricatorLiskDAO', @@ -5066,13 +5066,13 @@ phutil_register_library_map(array( 'PhabricatorSetupIssueExample' => 'PhabricatorUIExample', 'PhabricatorSetupIssueView' => 'AphrontView', 'PhabricatorSlowvoteApplication' => 'PhabricatorApplication', - 'PhabricatorSlowvoteCapabilityDefaultView' => 'PhabricatorPolicyCapability', 'PhabricatorSlowvoteChoice' => 'PhabricatorSlowvoteDAO', 'PhabricatorSlowvoteCloseController' => 'PhabricatorSlowvoteController', 'PhabricatorSlowvoteComment' => 'PhabricatorSlowvoteDAO', 'PhabricatorSlowvoteCommentController' => 'PhabricatorSlowvoteController', 'PhabricatorSlowvoteController' => 'PhabricatorController', 'PhabricatorSlowvoteDAO' => 'PhabricatorLiskDAO', + 'PhabricatorSlowvoteDefaultViewCapability' => 'PhabricatorPolicyCapability', 'PhabricatorSlowvoteEditController' => 'PhabricatorSlowvoteController', 'PhabricatorSlowvoteEditor' => 'PhabricatorApplicationTransactionEditor', 'PhabricatorSlowvoteListController' => 'PhabricatorSlowvoteController', @@ -5322,10 +5322,10 @@ phutil_register_library_map(array( 'PhluxVariableQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhluxViewController' => 'PhluxController', 'PholioActionMenuEventListener' => 'PhabricatorEventListener', - 'PholioCapabilityDefaultEdit' => 'PhabricatorPolicyCapability', - 'PholioCapabilityDefaultView' => 'PhabricatorPolicyCapability', 'PholioController' => 'PhabricatorController', 'PholioDAO' => 'PhabricatorLiskDAO', + 'PholioDefaultEditCapability' => 'PhabricatorPolicyCapability', + 'PholioDefaultViewCapability' => 'PhabricatorPolicyCapability', 'PholioImage' => array( 'PholioDAO', 'PhabricatorMarkupInterface', @@ -5435,7 +5435,7 @@ phutil_register_library_map(array( 'PhortuneTestPaymentProvider' => 'PhortunePaymentProvider', 'PhortuneWePayPaymentProvider' => 'PhortunePaymentProvider', 'PhragmentBrowseController' => 'PhragmentController', - 'PhragmentCapabilityCanCreate' => 'PhabricatorPolicyCapability', + 'PhragmentCanCreateCapability' => 'PhabricatorPolicyCapability', 'PhragmentController' => 'PhabricatorController', 'PhragmentCreateController' => 'PhragmentController', 'PhragmentDAO' => 'PhabricatorLiskDAO', @@ -5584,7 +5584,7 @@ phutil_register_library_map(array( 'PonderVote' => 'PonderConstants', 'PonderVoteEditor' => 'PhabricatorEditor', 'PonderVoteSaveController' => 'PonderController', - 'ProjectCapabilityCreateProjects' => 'PhabricatorPolicyCapability', + 'ProjectCreateProjectsCapability' => 'PhabricatorPolicyCapability', 'ProjectRemarkupRule' => 'PhabricatorRemarkupRuleObject', 'QueryFormattingTestCase' => 'PhabricatorTestCase', 'ReleephAuthorFieldSpecification' => 'ReleephFieldSpecification', diff --git a/src/applications/countdown/application/PhabricatorCountdownApplication.php b/src/applications/countdown/application/PhabricatorCountdownApplication.php index 2aa3530712..9f54829a8c 100644 --- a/src/applications/countdown/application/PhabricatorCountdownApplication.php +++ b/src/applications/countdown/application/PhabricatorCountdownApplication.php @@ -50,7 +50,7 @@ final class PhabricatorCountdownApplication extends PhabricatorApplication { public function getCustomCapabilities() { return array( - PhabricatorCountdownCapabilityDefaultView::CAPABILITY => array( + PhabricatorCountdownDefaultViewCapability::CAPABILITY => array( 'caption' => pht('Default view policy for new countdowns.'), ), ); diff --git a/src/applications/countdown/capability/PhabricatorCountdownCapabilityDefaultView.php b/src/applications/countdown/capability/PhabricatorCountdownDefaultViewCapability.php similarity index 85% rename from src/applications/countdown/capability/PhabricatorCountdownCapabilityDefaultView.php rename to src/applications/countdown/capability/PhabricatorCountdownDefaultViewCapability.php index ddd44359d4..da0c8017e0 100644 --- a/src/applications/countdown/capability/PhabricatorCountdownCapabilityDefaultView.php +++ b/src/applications/countdown/capability/PhabricatorCountdownDefaultViewCapability.php @@ -1,6 +1,6 @@ executeOne(); $view_policy = $app->getPolicy( - PhabricatorCountdownCapabilityDefaultView::CAPABILITY); + PhabricatorCountdownDefaultViewCapability::CAPABILITY); return id(new PhabricatorCountdown()) ->setAuthorPHID($actor->getPHID()) diff --git a/src/applications/differential/application/PhabricatorDifferentialApplication.php b/src/applications/differential/application/PhabricatorDifferentialApplication.php index 67691d5c86..1b7495a13c 100644 --- a/src/applications/differential/application/PhabricatorDifferentialApplication.php +++ b/src/applications/differential/application/PhabricatorDifferentialApplication.php @@ -133,7 +133,7 @@ EOTEXT protected function getCustomCapabilities() { return array( - DifferentialCapabilityDefaultView::CAPABILITY => array( + DifferentialDefaultViewCapability::CAPABILITY => array( 'caption' => pht('Default view policy for newly created revisions.'), ), ); diff --git a/src/applications/differential/capability/DifferentialCapabilityDefaultView.php b/src/applications/differential/capability/DifferentialDefaultViewCapability.php similarity index 87% rename from src/applications/differential/capability/DifferentialCapabilityDefaultView.php rename to src/applications/differential/capability/DifferentialDefaultViewCapability.php index a0dbd99e5f..fa34df7f40 100644 --- a/src/applications/differential/capability/DifferentialCapabilityDefaultView.php +++ b/src/applications/differential/capability/DifferentialDefaultViewCapability.php @@ -1,6 +1,6 @@ getUser(), $repository, - DiffusionCapabilityPush::CAPABILITY); + DiffusionPushCapability::CAPABILITY); if (!$can_push) { throw new Exception( @@ -159,4 +159,5 @@ final class DifferentialRevisionLandController extends DifferentialController { $lock->lock(); return $lock; } + } diff --git a/src/applications/differential/landing/DifferentialLandingStrategy.php b/src/applications/differential/landing/DifferentialLandingStrategy.php index 211c54b989..92fcaf34bf 100644 --- a/src/applications/differential/landing/DifferentialLandingStrategy.php +++ b/src/applications/differential/landing/DifferentialLandingStrategy.php @@ -8,7 +8,7 @@ abstract class DifferentialLandingStrategy { PhabricatorRepository $repository); /** - * returns PhabricatorActionView or null. + * @return PhabricatorActionView or null. */ abstract function createMenuItem( PhabricatorUser $viewer, @@ -16,7 +16,7 @@ abstract class DifferentialLandingStrategy { PhabricatorRepository $repository); /** - * returns PhabricatorActionView which can be attached to the revision view. + * @return PhabricatorActionView which can be attached to the revision view. */ protected function createActionView($revision, $name) { $strategy = get_class($this); @@ -34,8 +34,8 @@ abstract class DifferentialLandingStrategy { * By default, this method checks for push permissions, and for the * revision being Accepted. * - * @return FALSE for "not disabled"; - * Human-readable text explaining why, if it is disabled; + * @return False for "not disabled"; human-readable text explaining why, if + * it is disabled. */ public function isActionDisabled( PhabricatorUser $viewer, @@ -50,7 +50,7 @@ abstract class DifferentialLandingStrategy { if (!PhabricatorPolicyFilter::hasCapability( $viewer, $repository, - DiffusionCapabilityPush::CAPABILITY)) { + DiffusionPushCapability::CAPABILITY)) { return pht('You do not have permissions to push to this repository.'); } @@ -58,29 +58,26 @@ abstract class DifferentialLandingStrategy { } /** - * might break if repository is not Git. + * Might break if repository is not Git. */ protected function getGitWorkspace(PhabricatorRepository $repository) { try { return DifferentialGetWorkingCopy::getCleanGitWorkspace($repository); } catch (Exception $e) { - throw new PhutilProxyException( - 'Failed to allocate a workspace', - $e); + throw new PhutilProxyException('Failed to allocate a workspace', $e); } } /** - * might break if repository is not Mercurial. + * Might break if repository is not Mercurial. */ protected function getMercurialWorkspace(PhabricatorRepository $repository) { try { return DifferentialGetWorkingCopy::getCleanMercurialWorkspace( $repository); } catch (Exception $e) { - throw new PhutilProxyException( - 'Failed to allocate a workspace', - $e); + throw new PhutilProxyException('Failed to allocate a workspace', $e); } } + } diff --git a/src/applications/differential/storage/DifferentialRevision.php b/src/applications/differential/storage/DifferentialRevision.php index 8f549885fc..41431c2e17 100644 --- a/src/applications/differential/storage/DifferentialRevision.php +++ b/src/applications/differential/storage/DifferentialRevision.php @@ -57,7 +57,7 @@ final class DifferentialRevision extends DifferentialDAO ->executeOne(); $view_policy = $app->getPolicy( - DifferentialCapabilityDefaultView::CAPABILITY); + DifferentialDefaultViewCapability::CAPABILITY); return id(new DifferentialRevision()) ->setViewPolicy($view_policy) diff --git a/src/applications/diffusion/application/PhabricatorDiffusionApplication.php b/src/applications/diffusion/application/PhabricatorDiffusionApplication.php index 99cb69db2d..fff226e662 100644 --- a/src/applications/diffusion/application/PhabricatorDiffusionApplication.php +++ b/src/applications/diffusion/application/PhabricatorDiffusionApplication.php @@ -130,12 +130,12 @@ final class PhabricatorDiffusionApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - DiffusionCapabilityDefaultView::CAPABILITY => array(), - DiffusionCapabilityDefaultEdit::CAPABILITY => array( + DiffusionDefaultViewCapability::CAPABILITY => array(), + DiffusionDefaultEditCapability::CAPABILITY => array( 'default' => PhabricatorPolicies::POLICY_ADMIN, ), - DiffusionCapabilityDefaultPush::CAPABILITY => array(), - DiffusionCapabilityCreateRepositories::CAPABILITY => array( + DiffusionDefaultPushCapability::CAPABILITY => array(), + DiffusionCreateRepositoriesCapability::CAPABILITY => array( 'default' => PhabricatorPolicies::POLICY_ADMIN, ), ); diff --git a/src/applications/diffusion/capability/DiffusionCapabilityCreateRepositories.php b/src/applications/diffusion/capability/DiffusionCreateRepositoriesCapability.php similarity index 88% rename from src/applications/diffusion/capability/DiffusionCapabilityCreateRepositories.php rename to src/applications/diffusion/capability/DiffusionCreateRepositoriesCapability.php index c831c95af5..9c9fad4bbf 100644 --- a/src/applications/diffusion/capability/DiffusionCapabilityCreateRepositories.php +++ b/src/applications/diffusion/capability/DiffusionCreateRepositoriesCapability.php @@ -1,6 +1,6 @@ requireApplicationCapability( - DiffusionCapabilityCreateRepositories::CAPABILITY); + DiffusionCreateRepositoriesCapability::CAPABILITY); $cancel_uri = $this->getApplicationURI('new/'); break; @@ -671,7 +671,7 @@ final class DiffusionRepositoryCreateController $push_policy = id(new AphrontFormPolicyControl()) ->setUser($viewer) - ->setCapability(DiffusionCapabilityPush::CAPABILITY) + ->setCapability(DiffusionPushCapability::CAPABILITY) ->setPolicyObject($repository) ->setPolicies($policies) ->setName('pushPolicy'); @@ -849,5 +849,4 @@ final class DiffusionRepositoryCreateController return $this->repository; } - } diff --git a/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php b/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php index 85c611bfb1..a451aaf711 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php @@ -372,7 +372,7 @@ final class DiffusionRepositoryEditMainController $descriptions[PhabricatorPolicyCapability::CAN_EDIT]); $pushable = $repository->isHosted() - ? $descriptions[DiffusionCapabilityPush::CAPABILITY] + ? $descriptions[DiffusionPushCapability::CAPABILITY] : phutil_tag('em', array(), pht('Not a Hosted Repository')); $view->addProperty(pht('Pushable By'), $pushable); diff --git a/src/applications/diffusion/controller/DiffusionRepositoryListController.php b/src/applications/diffusion/controller/DiffusionRepositoryListController.php index aa32faed44..4202905146 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryListController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryListController.php @@ -41,7 +41,7 @@ final class DiffusionRepositoryListController extends DiffusionController { $crumbs = parent::buildApplicationCrumbs(); $can_create = $this->hasApplicationCapability( - DiffusionCapabilityCreateRepositories::CAPABILITY); + DiffusionCreateRepositoriesCapability::CAPABILITY); $crumbs->addAction( id(new PHUIListItemView()) diff --git a/src/applications/diffusion/controller/DiffusionRepositoryNewController.php b/src/applications/diffusion/controller/DiffusionRepositoryNewController.php index b649130f28..f1f0cd95e1 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryNewController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryNewController.php @@ -1,14 +1,13 @@ getRequest(); $viewer = $request->getUser(); $this->requireApplicationCapability( - DiffusionCapabilityCreateRepositories::CAPABILITY); + DiffusionCreateRepositoriesCapability::CAPABILITY); if ($request->isFormPost()) { if ($request->getStr('type')) { diff --git a/src/applications/diffusion/controller/DiffusionServeController.php b/src/applications/diffusion/controller/DiffusionServeController.php index 3154231116..9734ffff72 100644 --- a/src/applications/diffusion/controller/DiffusionServeController.php +++ b/src/applications/diffusion/controller/DiffusionServeController.php @@ -144,7 +144,7 @@ final class DiffusionServeController extends DiffusionController { $can_push = PhabricatorPolicyFilter::hasCapability( $viewer, $repository, - DiffusionCapabilityPush::CAPABILITY); + DiffusionPushCapability::CAPABILITY); if (!$can_push) { if ($viewer->isLoggedIn()) { return new PhabricatorVCSResponse( diff --git a/src/applications/diffusion/ssh/DiffusionSSHWorkflow.php b/src/applications/diffusion/ssh/DiffusionSSHWorkflow.php index d62ff1d87e..fda7f16f94 100644 --- a/src/applications/diffusion/ssh/DiffusionSSHWorkflow.php +++ b/src/applications/diffusion/ssh/DiffusionSSHWorkflow.php @@ -118,7 +118,7 @@ abstract class DiffusionSSHWorkflow extends PhabricatorSSHWorkflow { $can_push = PhabricatorPolicyFilter::hasCapability( $viewer, $repository, - DiffusionCapabilityPush::CAPABILITY); + DiffusionPushCapability::CAPABILITY); if (!$can_push) { throw new Exception( pht('You do not have permission to push to this repository.')); diff --git a/src/applications/drydock/application/PhabricatorDrydockApplication.php b/src/applications/drydock/application/PhabricatorDrydockApplication.php index 78b151fa89..eee22fff32 100644 --- a/src/applications/drydock/application/PhabricatorDrydockApplication.php +++ b/src/applications/drydock/application/PhabricatorDrydockApplication.php @@ -67,11 +67,11 @@ final class PhabricatorDrydockApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - DrydockCapabilityDefaultView::CAPABILITY => array(), - DrydockCapabilityDefaultEdit::CAPABILITY => array( + DrydockDefaultViewCapability::CAPABILITY => array(), + DrydockDefaultEditCapability::CAPABILITY => array( 'default' => PhabricatorPolicies::POLICY_ADMIN, ), - DrydockCapabilityCreateBlueprints::CAPABILITY => array( + DrydockCreateBlueprintsCapability::CAPABILITY => array( 'default' => PhabricatorPolicies::POLICY_ADMIN, ), ); diff --git a/src/applications/drydock/capability/DrydockCapabilityCreateBlueprints.php b/src/applications/drydock/capability/DrydockCreateBlueprintsCapability.php similarity index 89% rename from src/applications/drydock/capability/DrydockCapabilityCreateBlueprints.php rename to src/applications/drydock/capability/DrydockCreateBlueprintsCapability.php index 3487385217..9b2a422f50 100644 --- a/src/applications/drydock/capability/DrydockCapabilityCreateBlueprints.php +++ b/src/applications/drydock/capability/DrydockCreateBlueprintsCapability.php @@ -1,6 +1,6 @@ getUser(); $this->requireApplicationCapability( - DrydockCapabilityCreateBlueprints::CAPABILITY); + DrydockCreateBlueprintsCapability::CAPABILITY); $implementations = DrydockBlueprintImplementation::getAllBlueprintImplementations(); diff --git a/src/applications/drydock/controller/DrydockBlueprintEditController.php b/src/applications/drydock/controller/DrydockBlueprintEditController.php index dc826fd104..bd61795767 100644 --- a/src/applications/drydock/controller/DrydockBlueprintEditController.php +++ b/src/applications/drydock/controller/DrydockBlueprintEditController.php @@ -30,7 +30,7 @@ final class DrydockBlueprintEditController extends DrydockBlueprintController { $cancel_uri = $this->getApplicationURI('blueprint/'.$this->id.'/'); } else { $this->requireApplicationCapability( - DrydockCapabilityCreateBlueprints::CAPABILITY); + DrydockCreateBlueprintsCapability::CAPABILITY); $class = $request->getStr('class'); diff --git a/src/applications/drydock/controller/DrydockBlueprintListController.php b/src/applications/drydock/controller/DrydockBlueprintListController.php index 687c21be98..53231d0eac 100644 --- a/src/applications/drydock/controller/DrydockBlueprintListController.php +++ b/src/applications/drydock/controller/DrydockBlueprintListController.php @@ -24,7 +24,7 @@ final class DrydockBlueprintListController extends DrydockBlueprintController { public function buildApplicationCrumbs() { $can_create = $this->hasApplicationCapability( - DrydockCapabilityCreateBlueprints::CAPABILITY); + DrydockCreateBlueprintsCapability::CAPABILITY); $crumbs = parent::buildApplicationCrumbs(); $crumbs->addAction( diff --git a/src/applications/drydock/storage/DrydockBlueprint.php b/src/applications/drydock/storage/DrydockBlueprint.php index 7b6aa095e4..f2587e3511 100644 --- a/src/applications/drydock/storage/DrydockBlueprint.php +++ b/src/applications/drydock/storage/DrydockBlueprint.php @@ -18,9 +18,9 @@ final class DrydockBlueprint extends DrydockDAO ->executeOne(); $view_policy = $app->getPolicy( - DrydockCapabilityDefaultView::CAPABILITY); + DrydockDefaultViewCapability::CAPABILITY); $edit_policy = $app->getPolicy( - DrydockCapabilityDefaultEdit::CAPABILITY); + DrydockDefaultEditCapability::CAPABILITY); return id(new DrydockBlueprint()) ->setViewPolicy($view_policy) diff --git a/src/applications/harbormaster/application/PhabricatorHarbormasterApplication.php b/src/applications/harbormaster/application/PhabricatorHarbormasterApplication.php index e7e750c66d..38a47f6b60 100644 --- a/src/applications/harbormaster/application/PhabricatorHarbormasterApplication.php +++ b/src/applications/harbormaster/application/PhabricatorHarbormasterApplication.php @@ -83,7 +83,7 @@ final class PhabricatorHarbormasterApplication extends PhabricatorApplication { public function getCustomCapabilities() { return array( - HarbormasterCapabilityManagePlans::CAPABILITY => array( + HarbormasterManagePlansCapability::CAPABILITY => array( 'caption' => pht('Can create and manage build plans.'), 'default' => PhabricatorPolicies::POLICY_ADMIN, ), diff --git a/src/applications/harbormaster/capability/HarbormasterCapabilityManagePlans.php b/src/applications/harbormaster/capability/HarbormasterManagePlansCapability.php similarity index 89% rename from src/applications/harbormaster/capability/HarbormasterCapabilityManagePlans.php rename to src/applications/harbormaster/capability/HarbormasterManagePlansCapability.php index 06f92edc41..b82dcbd2f8 100644 --- a/src/applications/harbormaster/capability/HarbormasterCapabilityManagePlans.php +++ b/src/applications/harbormaster/capability/HarbormasterManagePlansCapability.php @@ -1,6 +1,6 @@ getUser(); $this->requireApplicationCapability( - HarbormasterCapabilityManagePlans::CAPABILITY); + HarbormasterManagePlansCapability::CAPABILITY); $plan = id(new HarbormasterBuildPlanQuery()) ->setViewer($viewer) diff --git a/src/applications/harbormaster/controller/HarbormasterPlanEditController.php b/src/applications/harbormaster/controller/HarbormasterPlanEditController.php index 8bacc51fcf..c291f4e678 100644 --- a/src/applications/harbormaster/controller/HarbormasterPlanEditController.php +++ b/src/applications/harbormaster/controller/HarbormasterPlanEditController.php @@ -1,7 +1,6 @@ getUser(); $this->requireApplicationCapability( - HarbormasterCapabilityManagePlans::CAPABILITY); + HarbormasterManagePlansCapability::CAPABILITY); if ($this->id) { $plan = id(new HarbormasterBuildPlanQuery()) diff --git a/src/applications/harbormaster/controller/HarbormasterPlanOrderController.php b/src/applications/harbormaster/controller/HarbormasterPlanOrderController.php index a29c8e6dad..8f2b84319f 100644 --- a/src/applications/harbormaster/controller/HarbormasterPlanOrderController.php +++ b/src/applications/harbormaster/controller/HarbormasterPlanOrderController.php @@ -15,7 +15,7 @@ final class HarbormasterPlanOrderController extends HarbormasterController { $request->validateCSRF(); $this->requireApplicationCapability( - HarbormasterCapabilityManagePlans::CAPABILITY); + HarbormasterManagePlansCapability::CAPABILITY); $plan = id(new HarbormasterBuildPlanQuery()) ->setViewer($user) diff --git a/src/applications/harbormaster/controller/HarbormasterPlanRunController.php b/src/applications/harbormaster/controller/HarbormasterPlanRunController.php index b9aec75d69..9eeabfc29d 100644 --- a/src/applications/harbormaster/controller/HarbormasterPlanRunController.php +++ b/src/applications/harbormaster/controller/HarbormasterPlanRunController.php @@ -1,7 +1,6 @@ getUser(); $this->requireApplicationCapability( - HarbormasterCapabilityManagePlans::CAPABILITY); + HarbormasterManagePlansCapability::CAPABILITY); $plan_id = $this->id; $plan = id(new HarbormasterBuildPlanQuery()) diff --git a/src/applications/harbormaster/controller/HarbormasterPlanViewController.php b/src/applications/harbormaster/controller/HarbormasterPlanViewController.php index 49f91d8690..c5378ace75 100644 --- a/src/applications/harbormaster/controller/HarbormasterPlanViewController.php +++ b/src/applications/harbormaster/controller/HarbormasterPlanViewController.php @@ -1,7 +1,6 @@ execute(); $can_edit = $this->hasApplicationCapability( - HarbormasterCapabilityManagePlans::CAPABILITY); + HarbormasterManagePlansCapability::CAPABILITY); $i = 1; $step_list = id(new PHUIObjectItemListView()) @@ -215,7 +214,7 @@ final class HarbormasterPlanViewController ->setObjectURI($this->getApplicationURI("plan/{$id}/")); $can_edit = $this->hasApplicationCapability( - HarbormasterCapabilityManagePlans::CAPABILITY); + HarbormasterManagePlansCapability::CAPABILITY); $list->addAction( id(new PhabricatorActionView()) diff --git a/src/applications/harbormaster/controller/HarbormasterStepAddController.php b/src/applications/harbormaster/controller/HarbormasterStepAddController.php index f9ca0a1649..0d02713091 100644 --- a/src/applications/harbormaster/controller/HarbormasterStepAddController.php +++ b/src/applications/harbormaster/controller/HarbormasterStepAddController.php @@ -1,7 +1,6 @@ getUser(); $this->requireApplicationCapability( - HarbormasterCapabilityManagePlans::CAPABILITY); + HarbormasterManagePlansCapability::CAPABILITY); $plan = id(new HarbormasterBuildPlanQuery()) - ->setViewer($viewer) - ->withIDs(array($this->id)) - ->executeOne(); + ->setViewer($viewer) + ->withIDs(array($this->id)) + ->executeOne(); if (!$plan) { return new Aphront404Response(); } @@ -31,8 +30,7 @@ final class HarbormasterStepAddController if ($request->isFormPost()) { $class = $request->getStr('class'); if (!HarbormasterBuildStepImplementation::getImplementation($class)) { - $errors[] = pht( - 'Choose the type of build step you want to add.'); + $errors[] = pht('Choose the type of build step you want to add.'); } if (!$errors) { $new_uri = $this->getApplicationURI("step/new/{$plan_id}/{$class}/"); diff --git a/src/applications/harbormaster/controller/HarbormasterStepDeleteController.php b/src/applications/harbormaster/controller/HarbormasterStepDeleteController.php index 0ccd8bd4a1..228304e738 100644 --- a/src/applications/harbormaster/controller/HarbormasterStepDeleteController.php +++ b/src/applications/harbormaster/controller/HarbormasterStepDeleteController.php @@ -1,7 +1,6 @@ getUser(); $this->requireApplicationCapability( - HarbormasterCapabilityManagePlans::CAPABILITY); + HarbormasterManagePlansCapability::CAPABILITY); $id = $this->id; diff --git a/src/applications/harbormaster/controller/HarbormasterStepEditController.php b/src/applications/harbormaster/controller/HarbormasterStepEditController.php index 09da4df9c9..ea0a648929 100644 --- a/src/applications/harbormaster/controller/HarbormasterStepEditController.php +++ b/src/applications/harbormaster/controller/HarbormasterStepEditController.php @@ -1,7 +1,6 @@ getUser(); $this->requireApplicationCapability( - HarbormasterCapabilityManagePlans::CAPABILITY); + HarbormasterManagePlansCapability::CAPABILITY); if ($this->id) { $step = id(new HarbormasterBuildStepQuery()) @@ -200,5 +199,4 @@ final class HarbormasterStepEditController ->appendChild($form); } - } diff --git a/src/applications/herald/application/PhabricatorHeraldApplication.php b/src/applications/herald/application/PhabricatorHeraldApplication.php index 6a6f67c991..931a42cc71 100644 --- a/src/applications/herald/application/PhabricatorHeraldApplication.php +++ b/src/applications/herald/application/PhabricatorHeraldApplication.php @@ -63,7 +63,7 @@ final class PhabricatorHeraldApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - HeraldCapabilityManageGlobalRules::CAPABILITY => array( + HeraldManageGlobalRulesCapability::CAPABILITY => array( 'caption' => pht('Global rules can bypass access controls.'), 'default' => PhabricatorPolicies::POLICY_ADMIN, ), diff --git a/src/applications/herald/capability/HeraldCapabilityManageGlobalRules.php b/src/applications/herald/capability/HeraldManageGlobalRulesCapability.php similarity index 89% rename from src/applications/herald/capability/HeraldCapabilityManageGlobalRules.php rename to src/applications/herald/capability/HeraldManageGlobalRulesCapability.php index 3812879d7d..bed90d77d5 100644 --- a/src/applications/herald/capability/HeraldCapabilityManageGlobalRules.php +++ b/src/applications/herald/capability/HeraldManageGlobalRulesCapability.php @@ -1,6 +1,6 @@ isGlobalRule()) { $this->requireApplicationCapability( - HeraldCapabilityManageGlobalRules::CAPABILITY); + HeraldManageGlobalRulesCapability::CAPABILITY); } $view_uri = $this->getApplicationURI("rule/{$id}/"); diff --git a/src/applications/herald/controller/HeraldNewController.php b/src/applications/herald/controller/HeraldNewController.php index acfccab93c..2bbc00456f 100644 --- a/src/applications/herald/controller/HeraldNewController.php +++ b/src/applications/herald/controller/HeraldNewController.php @@ -251,7 +251,7 @@ final class HeraldNewController extends HeraldController { )) + $rule_type_map; list($can_global, $global_link) = $this->explainApplicationCapability( - HeraldCapabilityManageGlobalRules::CAPABILITY, + HeraldManageGlobalRulesCapability::CAPABILITY, pht('You have permission to create and manage global rules.'), pht('You do not have permission to create or manage global rules.')); @@ -313,4 +313,5 @@ final class HeraldNewController extends HeraldController { return $radio; } + } diff --git a/src/applications/herald/controller/HeraldRuleController.php b/src/applications/herald/controller/HeraldRuleController.php index 83c91e5d07..5a701e44c6 100644 --- a/src/applications/herald/controller/HeraldRuleController.php +++ b/src/applications/herald/controller/HeraldRuleController.php @@ -10,7 +10,6 @@ final class HeraldRuleController extends HeraldController { } public function processRequest() { - $request = $this->getRequest(); $user = $request->getUser(); @@ -83,7 +82,7 @@ final class HeraldRuleController extends HeraldController { if ($rule->isGlobalRule()) { $this->requireApplicationCapability( - HeraldCapabilityManageGlobalRules::CAPABILITY); + HeraldManageGlobalRulesCapability::CAPABILITY); } $adapter = HeraldAdapter::getAdapterForContentType($rule->getContentType()); @@ -666,5 +665,4 @@ final class HeraldRuleController extends HeraldController { return $all_rules; } - } diff --git a/src/applications/herald/storage/HeraldRule.php b/src/applications/herald/storage/HeraldRule.php index a9753797e9..7397f570fa 100644 --- a/src/applications/herald/storage/HeraldRule.php +++ b/src/applications/herald/storage/HeraldRule.php @@ -223,7 +223,7 @@ final class HeraldRule extends HeraldDAO case PhabricatorPolicyCapability::CAN_EDIT: $app = 'PhabricatorHeraldApplication'; $herald = PhabricatorApplication::getByClass($app); - $global = HeraldCapabilityManageGlobalRules::CAPABILITY; + $global = HeraldManageGlobalRulesCapability::CAPABILITY; return $herald->getPolicy($global); } } else if ($this->isObjectRule()) { diff --git a/src/applications/legalpad/application/PhabricatorLegalpadApplication.php b/src/applications/legalpad/application/PhabricatorLegalpadApplication.php index d9ee3c8e65..b5ef2792ce 100644 --- a/src/applications/legalpad/application/PhabricatorLegalpadApplication.php +++ b/src/applications/legalpad/application/PhabricatorLegalpadApplication.php @@ -68,9 +68,9 @@ final class PhabricatorLegalpadApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - LegalpadCapabilityCreateDocuments::CAPABILITY => array(), - LegalpadCapabilityDefaultView::CAPABILITY => array(), - LegalpadCapabilityDefaultEdit::CAPABILITY => array(), + LegalpadCreateDocumentsCapability::CAPABILITY => array(), + LegalpadDefaultViewCapability::CAPABILITY => array(), + LegalpadDefaultEditCapability::CAPABILITY => array(), ); } diff --git a/src/applications/legalpad/capability/LegalpadCapabilityCreateDocuments.php b/src/applications/legalpad/capability/LegalpadCreateDocumentsCapability.php similarity index 89% rename from src/applications/legalpad/capability/LegalpadCapabilityCreateDocuments.php rename to src/applications/legalpad/capability/LegalpadCreateDocumentsCapability.php index e231ad35dd..4924cfc283 100644 --- a/src/applications/legalpad/capability/LegalpadCapabilityCreateDocuments.php +++ b/src/applications/legalpad/capability/LegalpadCreateDocumentsCapability.php @@ -1,6 +1,6 @@ requireApplicationCapability( - LegalpadCapabilityCreateDocuments::CAPABILITY); + LegalpadCreateDocumentsCapability::CAPABILITY); $document = LegalpadDocument::initializeNewDocument($user); $body = id(new LegalpadDocumentBody()) diff --git a/src/applications/legalpad/controller/LegalpadDocumentListController.php b/src/applications/legalpad/controller/LegalpadDocumentListController.php index a6ff9b0379..28221c643f 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentListController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentListController.php @@ -26,7 +26,7 @@ final class LegalpadDocumentListController extends LegalpadController { $crumbs = parent::buildApplicationCrumbs(); $can_create = $this->hasApplicationCapability( - LegalpadCapabilityCreateDocuments::CAPABILITY); + LegalpadCreateDocumentsCapability::CAPABILITY); $crumbs->addAction( id(new PHUIListItemView()) diff --git a/src/applications/legalpad/storage/LegalpadDocument.php b/src/applications/legalpad/storage/LegalpadDocument.php index d59f853c03..ac78b5d6fc 100644 --- a/src/applications/legalpad/storage/LegalpadDocument.php +++ b/src/applications/legalpad/storage/LegalpadDocument.php @@ -33,8 +33,8 @@ final class LegalpadDocument extends LegalpadDAO ->withClasses(array('PhabricatorLegalpadApplication')) ->executeOne(); - $view_policy = $app->getPolicy(LegalpadCapabilityDefaultView::CAPABILITY); - $edit_policy = $app->getPolicy(LegalpadCapabilityDefaultEdit::CAPABILITY); + $view_policy = $app->getPolicy(LegalpadDefaultViewCapability::CAPABILITY); + $edit_policy = $app->getPolicy(LegalpadDefaultEditCapability::CAPABILITY); return id(new LegalpadDocument()) ->setVersions(0) diff --git a/src/applications/macro/application/PhabricatorMacroApplication.php b/src/applications/macro/application/PhabricatorMacroApplication.php index 8a41999143..aa4df0d2cb 100644 --- a/src/applications/macro/application/PhabricatorMacroApplication.php +++ b/src/applications/macro/application/PhabricatorMacroApplication.php @@ -50,7 +50,7 @@ final class PhabricatorMacroApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - PhabricatorMacroCapabilityManage::CAPABILITY => array( + PhabricatorMacroManageCapability::CAPABILITY => array( 'caption' => pht('Allows creating and editing macros.'), ), ); diff --git a/src/applications/macro/capability/PhabricatorMacroCapabilityManage.php b/src/applications/macro/capability/PhabricatorMacroManageCapability.php similarity index 89% rename from src/applications/macro/capability/PhabricatorMacroCapabilityManage.php rename to src/applications/macro/capability/PhabricatorMacroManageCapability.php index f705123cf0..8c17c1385a 100644 --- a/src/applications/macro/capability/PhabricatorMacroCapabilityManage.php +++ b/src/applications/macro/capability/PhabricatorMacroManageCapability.php @@ -1,6 +1,6 @@ requireApplicationCapability( - PhabricatorMacroCapabilityManage::CAPABILITY); + PhabricatorMacroManageCapability::CAPABILITY); $request = $this->getRequest(); $viewer = $request->getUser(); @@ -157,4 +155,5 @@ final class PhabricatorMacroAudioController 'title' => $title, )); } + } diff --git a/src/applications/macro/controller/PhabricatorMacroController.php b/src/applications/macro/controller/PhabricatorMacroController.php index 648ddd8b6b..eb20975a85 100644 --- a/src/applications/macro/controller/PhabricatorMacroController.php +++ b/src/applications/macro/controller/PhabricatorMacroController.php @@ -1,7 +1,6 @@ hasApplicationCapability( - PhabricatorMacroCapabilityManage::CAPABILITY); + PhabricatorMacroManageCapability::CAPABILITY); $crumbs->addAction( id(new PHUIListItemView()) diff --git a/src/applications/macro/controller/PhabricatorMacroDisableController.php b/src/applications/macro/controller/PhabricatorMacroDisableController.php index 293911f50f..8afc89df9b 100644 --- a/src/applications/macro/controller/PhabricatorMacroDisableController.php +++ b/src/applications/macro/controller/PhabricatorMacroDisableController.php @@ -10,9 +10,8 @@ final class PhabricatorMacroDisableController } public function processRequest() { - $this->requireApplicationCapability( - PhabricatorMacroCapabilityManage::CAPABILITY); + PhabricatorMacroManageCapability::CAPABILITY); $request = $this->getRequest(); $user = $request->getUser(); @@ -55,4 +54,5 @@ final class PhabricatorMacroDisableController return id(new AphrontDialogResponse())->setDialog($dialog); } + } diff --git a/src/applications/macro/controller/PhabricatorMacroEditController.php b/src/applications/macro/controller/PhabricatorMacroEditController.php index 2f1404dbaf..287d8e6560 100644 --- a/src/applications/macro/controller/PhabricatorMacroEditController.php +++ b/src/applications/macro/controller/PhabricatorMacroEditController.php @@ -1,7 +1,6 @@ requireApplicationCapability( - PhabricatorMacroCapabilityManage::CAPABILITY); + PhabricatorMacroManageCapability::CAPABILITY); $request = $this->getRequest(); $user = $request->getUser(); @@ -262,4 +260,5 @@ final class PhabricatorMacroEditController 'title' => $title, )); } + } diff --git a/src/applications/macro/controller/PhabricatorMacroViewController.php b/src/applications/macro/controller/PhabricatorMacroViewController.php index 27864d55ef..d8336ca268 100644 --- a/src/applications/macro/controller/PhabricatorMacroViewController.php +++ b/src/applications/macro/controller/PhabricatorMacroViewController.php @@ -118,9 +118,8 @@ final class PhabricatorMacroViewController } private function buildActionView(PhabricatorFileImageMacro $macro) { - $can_manage = $this->hasApplicationCapability( - PhabricatorMacroCapabilityManage::CAPABILITY); + PhabricatorMacroManageCapability::CAPABILITY); $request = $this->getRequest(); $view = id(new PhabricatorActionListView()) diff --git a/src/applications/maniphest/application/PhabricatorManiphestApplication.php b/src/applications/maniphest/application/PhabricatorManiphestApplication.php index d5e2fe8415..3e42eadeae 100644 --- a/src/applications/maniphest/application/PhabricatorManiphestApplication.php +++ b/src/applications/maniphest/application/PhabricatorManiphestApplication.php @@ -104,18 +104,18 @@ final class PhabricatorManiphestApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - ManiphestCapabilityDefaultView::CAPABILITY => array( + ManiphestDefaultViewCapability::CAPABILITY => array( 'caption' => pht('Default view policy for newly created tasks.'), ), - ManiphestCapabilityDefaultEdit::CAPABILITY => array( + ManiphestDefaultEditCapability::CAPABILITY => array( 'caption' => pht('Default edit policy for newly created tasks.'), ), - ManiphestCapabilityEditStatus::CAPABILITY => array(), - ManiphestCapabilityEditAssign::CAPABILITY => array(), - ManiphestCapabilityEditPolicies::CAPABILITY => array(), - ManiphestCapabilityEditPriority::CAPABILITY => array(), - ManiphestCapabilityEditProjects::CAPABILITY => array(), - ManiphestCapabilityBulkEdit::CAPABILITY => array(), + ManiphestEditStatusCapability::CAPABILITY => array(), + ManiphestEditAssignCapability::CAPABILITY => array(), + ManiphestEditPoliciesCapability::CAPABILITY => array(), + ManiphestEditPriorityCapability::CAPABILITY => array(), + ManiphestEditProjectsCapability::CAPABILITY => array(), + ManiphestBulkEditCapability::CAPABILITY => array(), ); } diff --git a/src/applications/maniphest/capability/ManiphestCapabilityBulkEdit.php b/src/applications/maniphest/capability/ManiphestBulkEditCapability.php similarity index 80% rename from src/applications/maniphest/capability/ManiphestCapabilityBulkEdit.php rename to src/applications/maniphest/capability/ManiphestBulkEditCapability.php index 4a27ead299..22584da110 100644 --- a/src/applications/maniphest/capability/ManiphestCapabilityBulkEdit.php +++ b/src/applications/maniphest/capability/ManiphestBulkEditCapability.php @@ -1,7 +1,6 @@ requireApplicationCapability( - ManiphestCapabilityBulkEdit::CAPABILITY); + ManiphestBulkEditCapability::CAPABILITY); $request = $this->getRequest(); $user = $request->getUser(); diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index 6a62e314ab..2fb3e2c958 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -13,7 +13,6 @@ final class ManiphestTaskDetailController extends ManiphestController { } public function processRequest() { - $request = $this->getRequest(); $user = $request->getUser(); @@ -162,13 +161,13 @@ final class ManiphestTaskDetailController extends ManiphestController { $requires = array( ManiphestTransaction::TYPE_OWNER => - ManiphestCapabilityEditAssign::CAPABILITY, + ManiphestEditAssignCapability::CAPABILITY, ManiphestTransaction::TYPE_PRIORITY => - ManiphestCapabilityEditPriority::CAPABILITY, + ManiphestEditPriorityCapability::CAPABILITY, ManiphestTransaction::TYPE_PROJECTS => - ManiphestCapabilityEditProjects::CAPABILITY, + ManiphestEditProjectsCapability::CAPABILITY, ManiphestTransaction::TYPE_STATUS => - ManiphestCapabilityEditStatus::CAPABILITY, + ManiphestEditStatusCapability::CAPABILITY, ); foreach ($transaction_types as $type => $name) { diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php index 79ad18b2be..63eff1e1c1 100644 --- a/src/applications/maniphest/controller/ManiphestTaskEditController.php +++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php @@ -9,21 +9,20 @@ final class ManiphestTaskEditController extends ManiphestController { } public function processRequest() { - $request = $this->getRequest(); $user = $request->getUser(); $response_type = $request->getStr('responseType', 'task'); $can_edit_assign = $this->hasApplicationCapability( - ManiphestCapabilityEditAssign::CAPABILITY); + ManiphestEditAssignCapability::CAPABILITY); $can_edit_policies = $this->hasApplicationCapability( - ManiphestCapabilityEditPolicies::CAPABILITY); + ManiphestEditPoliciesCapability::CAPABILITY); $can_edit_priority = $this->hasApplicationCapability( - ManiphestCapabilityEditPriority::CAPABILITY); + ManiphestEditPriorityCapability::CAPABILITY); $can_edit_projects = $this->hasApplicationCapability( - ManiphestCapabilityEditProjects::CAPABILITY); + ManiphestEditProjectsCapability::CAPABILITY); $can_edit_status = $this->hasApplicationCapability( - ManiphestCapabilityEditStatus::CAPABILITY); + ManiphestEditStatusCapability::CAPABILITY); $parent_task = null; $template_id = null; @@ -750,4 +749,5 @@ final class ManiphestTaskEditController extends ManiphestController { 'pageObjects' => $page_objects, )); } + } diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php index 175c48c6f5..26f96e6844 100644 --- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php +++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php @@ -432,15 +432,15 @@ final class ManiphestTransactionEditor $app_capability_map = array( ManiphestTransaction::TYPE_PRIORITY => - ManiphestCapabilityEditPriority::CAPABILITY, + ManiphestEditPriorityCapability::CAPABILITY, ManiphestTransaction::TYPE_STATUS => - ManiphestCapabilityEditStatus::CAPABILITY, + ManiphestEditStatusCapability::CAPABILITY, ManiphestTransaction::TYPE_OWNER => - ManiphestCapabilityEditAssign::CAPABILITY, + ManiphestEditAssignCapability::CAPABILITY, PhabricatorTransactions::TYPE_EDIT_POLICY => - ManiphestCapabilityEditPolicies::CAPABILITY, + ManiphestEditPoliciesCapability::CAPABILITY, PhabricatorTransactions::TYPE_VIEW_POLICY => - ManiphestCapabilityEditPolicies::CAPABILITY, + ManiphestEditPoliciesCapability::CAPABILITY, ); @@ -450,7 +450,7 @@ final class ManiphestTransactionEditor if ($transaction_type == PhabricatorTransactions::TYPE_EDGE) { switch ($xaction->getMetadataValue('edge:type')) { case PhabricatorProjectObjectHasProjectEdgeType::EDGECONST: - $app_capability = ManiphestCapabilityEditProjects::CAPABILITY; + $app_capability = ManiphestEditProjectsCapability::CAPABILITY; break; } } else { diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php index 4cb40b74d7..ff72c1203e 100644 --- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php +++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php @@ -539,12 +539,12 @@ final class ManiphestTaskSearchEngine $can_edit_priority = PhabricatorPolicyFilter::hasCapability( $viewer, $this->getApplication(), - ManiphestCapabilityEditPriority::CAPABILITY); + ManiphestEditPriorityCapability::CAPABILITY); $can_bulk_edit = PhabricatorPolicyFilter::hasCapability( $viewer, $this->getApplication(), - ManiphestCapabilityBulkEdit::CAPABILITY); + ManiphestBulkEditCapability::CAPABILITY); } return id(new ManiphestTaskResultListView()) diff --git a/src/applications/maniphest/storage/ManiphestTask.php b/src/applications/maniphest/storage/ManiphestTask.php index b518629a4a..0a313a5b16 100644 --- a/src/applications/maniphest/storage/ManiphestTask.php +++ b/src/applications/maniphest/storage/ManiphestTask.php @@ -45,8 +45,8 @@ final class ManiphestTask extends ManiphestDAO ->withClasses(array('PhabricatorManiphestApplication')) ->executeOne(); - $view_policy = $app->getPolicy(ManiphestCapabilityDefaultView::CAPABILITY); - $edit_policy = $app->getPolicy(ManiphestCapabilityDefaultEdit::CAPABILITY); + $view_policy = $app->getPolicy(ManiphestDefaultViewCapability::CAPABILITY); + $edit_policy = $app->getPolicy(ManiphestDefaultEditCapability::CAPABILITY); return id(new ManiphestTask()) ->setStatus(ManiphestTaskStatus::getDefaultStatus()) diff --git a/src/applications/nuance/application/PhabricatorNuanceApplication.php b/src/applications/nuance/application/PhabricatorNuanceApplication.php index cdc1af88e5..2ff6d3b02b 100644 --- a/src/applications/nuance/application/PhabricatorNuanceApplication.php +++ b/src/applications/nuance/application/PhabricatorNuanceApplication.php @@ -64,13 +64,13 @@ final class PhabricatorNuanceApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - NuanceCapabilitySourceDefaultView::CAPABILITY => array( + NuanceSourceDefaultViewCapability::CAPABILITY => array( 'caption' => pht('Default view policy for newly created sources.'), ), - NuanceCapabilitySourceDefaultEdit::CAPABILITY => array( + NuanceSourceDefaultEditCapability::CAPABILITY => array( 'caption' => pht('Default edit policy for newly created sources.'), ), - NuanceCapabilitySourceManage::CAPABILITY => array(), + NuanceSourceManageCapability::CAPABILITY => array(), ); } diff --git a/src/applications/nuance/capability/NuanceCapabilitySourceDefaultEdit.php b/src/applications/nuance/capability/NuanceSourceDefaultEditCapability.php similarity index 85% rename from src/applications/nuance/capability/NuanceCapabilitySourceDefaultEdit.php rename to src/applications/nuance/capability/NuanceSourceDefaultEditCapability.php index 8dcf6e4c03..0c06fdad69 100644 --- a/src/applications/nuance/capability/NuanceCapabilitySourceDefaultEdit.php +++ b/src/applications/nuance/capability/NuanceSourceDefaultEditCapability.php @@ -1,6 +1,6 @@ requireApplicationCapability( - NuanceCapabilitySourceManage::CAPABILITY); + NuanceSourceManageCapability::CAPABILITY); $request = $this->getRequest(); $user = $request->getUser(); diff --git a/src/applications/nuance/storage/NuanceSource.php b/src/applications/nuance/storage/NuanceSource.php index 1cc6c95436..e6fc9da86b 100644 --- a/src/applications/nuance/storage/NuanceSource.php +++ b/src/applications/nuance/storage/NuanceSource.php @@ -41,9 +41,9 @@ final class NuanceSource extends NuanceDAO ->executeOne(); $view_policy = $app->getPolicy( - NuanceCapabilitySourceDefaultView::CAPABILITY); + NuanceSourceDefaultViewCapability::CAPABILITY); $edit_policy = $app->getPolicy( - NuanceCapabilitySourceDefaultEdit::CAPABILITY); + NuanceSourceDefaultEditCapability::CAPABILITY); $definitions = NuanceSourceDefinition::getAllDefinitions(); $lucky_definition = head($definitions); diff --git a/src/applications/oauthserver/application/PhabricatorOAuthServerApplication.php b/src/applications/oauthserver/application/PhabricatorOAuthServerApplication.php index 3a3c987e49..d962f30351 100644 --- a/src/applications/oauthserver/application/PhabricatorOAuthServerApplication.php +++ b/src/applications/oauthserver/application/PhabricatorOAuthServerApplication.php @@ -58,7 +58,7 @@ final class PhabricatorOAuthServerApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - PhabricatorOAuthServerCapabilityCreateClients::CAPABILITY => array( + PhabricatorOAuthServerCreateClientsCapability::CAPABILITY => array( 'default' => PhabricatorPolicies::POLICY_ADMIN, ), ); diff --git a/src/applications/oauthserver/capability/PhabricatorOAuthServerCapabilityCreateClients.php b/src/applications/oauthserver/capability/PhabricatorOAuthServerCreateClientsCapability.php similarity index 87% rename from src/applications/oauthserver/capability/PhabricatorOAuthServerCapabilityCreateClients.php rename to src/applications/oauthserver/capability/PhabricatorOAuthServerCreateClientsCapability.php index 8b8bc5176e..8e935dc881 100644 --- a/src/applications/oauthserver/capability/PhabricatorOAuthServerCapabilityCreateClients.php +++ b/src/applications/oauthserver/capability/PhabricatorOAuthServerCreateClientsCapability.php @@ -1,6 +1,6 @@ requireApplicationCapability( - PhabricatorOAuthServerCapabilityCreateClients::CAPABILITY); + PhabricatorOAuthServerCreateClientsCapability::CAPABILITY); $client = PhabricatorOAuthServerClient::initializeNewClient($viewer); diff --git a/src/applications/paste/application/PhabricatorPasteApplication.php b/src/applications/paste/application/PhabricatorPasteApplication.php index 79e21673a5..0ba12de478 100644 --- a/src/applications/paste/application/PhabricatorPasteApplication.php +++ b/src/applications/paste/application/PhabricatorPasteApplication.php @@ -47,7 +47,7 @@ final class PhabricatorPasteApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - PasteCapabilityDefaultView::CAPABILITY => array( + PasteDefaultViewCapability::CAPABILITY => array( 'caption' => pht('Default view policy for newly created pastes.'), ), ); diff --git a/src/applications/paste/capability/PasteCapabilityDefaultView.php b/src/applications/paste/capability/PasteDefaultViewCapability.php similarity index 78% rename from src/applications/paste/capability/PasteCapabilityDefaultView.php rename to src/applications/paste/capability/PasteDefaultViewCapability.php index 23b1478a67..471852c9af 100644 --- a/src/applications/paste/capability/PasteCapabilityDefaultView.php +++ b/src/applications/paste/capability/PasteDefaultViewCapability.php @@ -1,7 +1,6 @@ withClasses(array('PhabricatorPasteApplication')) ->executeOne(); - $view_policy = $app->getPolicy(PasteCapabilityDefaultView::CAPABILITY); + $view_policy = $app->getPolicy(PasteDefaultViewCapability::CAPABILITY); return id(new PhabricatorPaste()) ->setTitle('') diff --git a/src/applications/people/application/PhabricatorPeopleApplication.php b/src/applications/people/application/PhabricatorPeopleApplication.php index c2bd571613..8b6c82d3c3 100644 --- a/src/applications/people/application/PhabricatorPeopleApplication.php +++ b/src/applications/people/application/PhabricatorPeopleApplication.php @@ -76,10 +76,9 @@ final class PhabricatorPeopleApplication extends PhabricatorApplication { ); } - protected function getCustomCapabilities() { return array( - PeopleCapabilityBrowseUserDirectory::CAPABILITY => array(), + PeopleBrowseUserDirectoryCapability::CAPABILITY => array(), ); } diff --git a/src/applications/people/capability/PeopleCapabilityBrowseUserDirectory.php b/src/applications/people/capability/PeopleBrowseUserDirectoryCapability.php similarity index 74% rename from src/applications/people/capability/PeopleCapabilityBrowseUserDirectory.php rename to src/applications/people/capability/PeopleBrowseUserDirectoryCapability.php index 1f4fee9ce1..955101e2c6 100644 --- a/src/applications/people/capability/PeopleCapabilityBrowseUserDirectory.php +++ b/src/applications/people/capability/PeopleBrowseUserDirectoryCapability.php @@ -1,6 +1,6 @@ getUser(); $this->requireApplicationCapability( - PeopleCapabilityBrowseUserDirectory::CAPABILITY); + PeopleBrowseUserDirectoryCapability::CAPABILITY); $controller = id(new PhabricatorApplicationSearchController($request)) ->setQueryKey($this->key) diff --git a/src/applications/people/query/PhabricatorPeopleSearchEngine.php b/src/applications/people/query/PhabricatorPeopleSearchEngine.php index 2b8e2c7cf1..bc5ba884b6 100644 --- a/src/applications/people/query/PhabricatorPeopleSearchEngine.php +++ b/src/applications/people/query/PhabricatorPeopleSearchEngine.php @@ -46,7 +46,7 @@ final class PhabricatorPeopleSearchEngine $can_browse = PhabricatorPolicyFilter::hasCapability( $viewer, $this->getApplication(), - PeopleCapabilityBrowseUserDirectory::CAPABILITY); + PeopleBrowseUserDirectoryCapability::CAPABILITY); if (!$can_browse) { $query->withPHIDs(array($viewer->getPHID())); } diff --git a/src/applications/pholio/application/PhabricatorPholioApplication.php b/src/applications/pholio/application/PhabricatorPholioApplication.php index 63cb8310fd..8a6d411dc0 100644 --- a/src/applications/pholio/application/PhabricatorPholioApplication.php +++ b/src/applications/pholio/application/PhabricatorPholioApplication.php @@ -72,8 +72,8 @@ final class PhabricatorPholioApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - PholioCapabilityDefaultView::CAPABILITY => array(), - PholioCapabilityDefaultEdit::CAPABILITY => array(), + PholioDefaultViewCapability::CAPABILITY => array(), + PholioDefaultEditCapability::CAPABILITY => array(), ); } diff --git a/src/applications/pholio/capability/PholioCapabilityDefaultEdit.php b/src/applications/pholio/capability/PholioDefaultEditCapability.php similarity index 72% rename from src/applications/pholio/capability/PholioCapabilityDefaultEdit.php rename to src/applications/pholio/capability/PholioDefaultEditCapability.php index 039892b40e..4eb6b1e143 100644 --- a/src/applications/pholio/capability/PholioCapabilityDefaultEdit.php +++ b/src/applications/pholio/capability/PholioDefaultEditCapability.php @@ -1,7 +1,6 @@ withClasses(array('PhabricatorPholioApplication')) ->executeOne(); - $view_policy = $app->getPolicy(PholioCapabilityDefaultView::CAPABILITY); - $edit_policy = $app->getPolicy(PholioCapabilityDefaultEdit::CAPABILITY); + $view_policy = $app->getPolicy(PholioDefaultViewCapability::CAPABILITY); + $edit_policy = $app->getPolicy(PholioDefaultEditCapability::CAPABILITY); return id(new PholioMock()) ->setAuthorPHID($actor->getPHID()) diff --git a/src/applications/phragment/application/PhabricatorPhragmentApplication.php b/src/applications/phragment/application/PhabricatorPhragmentApplication.php index acc8d23619..823a603897 100644 --- a/src/applications/phragment/application/PhabricatorPhragmentApplication.php +++ b/src/applications/phragment/application/PhabricatorPhragmentApplication.php @@ -63,7 +63,7 @@ final class PhabricatorPhragmentApplication extends PhabricatorApplication { protected function getCustomCapabilities() { return array( - PhragmentCapabilityCanCreate::CAPABILITY => array(), + PhragmentCanCreateCapability::CAPABILITY => array(), ); } diff --git a/src/applications/phragment/capability/PhragmentCapabilityCanCreate.php b/src/applications/phragment/capability/PhragmentCanCreateCapability.php similarity index 80% rename from src/applications/phragment/capability/PhragmentCapabilityCanCreate.php rename to src/applications/phragment/capability/PhragmentCanCreateCapability.php index 860ece8f25..f166e78b63 100644 --- a/src/applications/phragment/capability/PhragmentCapabilityCanCreate.php +++ b/src/applications/phragment/capability/PhragmentCanCreateCapability.php @@ -1,7 +1,6 @@ buildApplicationCrumbsWithPath($parents); if ($this->hasApplicationCapability( - PhragmentCapabilityCanCreate::CAPABILITY)) { + PhragmentCanCreateCapability::CAPABILITY)) { $crumbs->addAction( id(new PHUIListItemView()) ->setName(pht('Create Fragment')) diff --git a/src/applications/phragment/controller/PhragmentHistoryController.php b/src/applications/phragment/controller/PhragmentHistoryController.php index 8ad6fe5588..c3102d938d 100644 --- a/src/applications/phragment/controller/PhragmentHistoryController.php +++ b/src/applications/phragment/controller/PhragmentHistoryController.php @@ -26,7 +26,7 @@ final class PhragmentHistoryController extends PhragmentController { $crumbs = $this->buildApplicationCrumbsWithPath($parents); if ($this->hasApplicationCapability( - PhragmentCapabilityCanCreate::CAPABILITY)) { + PhragmentCanCreateCapability::CAPABILITY)) { $crumbs->addAction( id(new PHUIListItemView()) ->setName(pht('Create Fragment')) diff --git a/src/applications/policy/capability/PhabricatorPolicyCapabilityCanEdit.php b/src/applications/policy/capability/PhabricatorPolicyCanEditCapability.php similarity index 87% rename from src/applications/policy/capability/PhabricatorPolicyCapabilityCanEdit.php rename to src/applications/policy/capability/PhabricatorPolicyCanEditCapability.php index ddf3a2e89f..aa5369c17b 100644 --- a/src/applications/policy/capability/PhabricatorPolicyCapabilityCanEdit.php +++ b/src/applications/policy/capability/PhabricatorPolicyCanEditCapability.php @@ -1,6 +1,6 @@ array(), + ProjectCreateProjectsCapability::CAPABILITY => array(), ); } diff --git a/src/applications/project/capability/ProjectCapabilityCreateProjects.php b/src/applications/project/capability/ProjectCreateProjectsCapability.php similarity index 89% rename from src/applications/project/capability/ProjectCapabilityCreateProjects.php rename to src/applications/project/capability/ProjectCreateProjectsCapability.php index b46f40b749..032d3735ee 100644 --- a/src/applications/project/capability/ProjectCapabilityCreateProjects.php +++ b/src/applications/project/capability/ProjectCreateProjectsCapability.php @@ -1,6 +1,6 @@ getRequest(); $user = $request->getUser(); $this->requireApplicationCapability( - ProjectCapabilityCreateProjects::CAPABILITY); + ProjectCreateProjectsCapability::CAPABILITY); $project = PhabricatorProject::initializeNewProject($user); @@ -113,4 +111,5 @@ final class PhabricatorProjectCreateController )); } } + } diff --git a/src/applications/project/controller/PhabricatorProjectListController.php b/src/applications/project/controller/PhabricatorProjectListController.php index ec0383c429..9339badbbd 100644 --- a/src/applications/project/controller/PhabricatorProjectListController.php +++ b/src/applications/project/controller/PhabricatorProjectListController.php @@ -27,7 +27,7 @@ final class PhabricatorProjectListController $crumbs = parent::buildApplicationCrumbs(); $can_create = $this->hasApplicationCapability( - ProjectCapabilityCreateProjects::CAPABILITY); + ProjectCreateProjectsCapability::CAPABILITY); $crumbs->addAction( id(new PHUIListItemView()) diff --git a/src/applications/repository/conduit/ConduitAPI_repository_create_Method.php b/src/applications/repository/conduit/ConduitAPI_repository_create_Method.php index 5e0d106ee9..4b363f88bf 100644 --- a/src/applications/repository/conduit/ConduitAPI_repository_create_Method.php +++ b/src/applications/repository/conduit/ConduitAPI_repository_create_Method.php @@ -64,7 +64,7 @@ final class ConduitAPI_repository_create_Method PhabricatorPolicyFilter::requireCapability( $request->getUser(), $application, - DiffusionCapabilityCreateRepositories::CAPABILITY); + DiffusionCreateRepositoriesCapability::CAPABILITY); // TODO: This has some duplication with (and lacks some of the validation // of) the web workflow; refactor things so they can share more code as this diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index d4e5adc589..43587cb6d7 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -54,9 +54,9 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO ->withClasses(array('PhabricatorDiffusionApplication')) ->executeOne(); - $view_policy = $app->getPolicy(DiffusionCapabilityDefaultView::CAPABILITY); - $edit_policy = $app->getPolicy(DiffusionCapabilityDefaultEdit::CAPABILITY); - $push_policy = $app->getPolicy(DiffusionCapabilityDefaultPush::CAPABILITY); + $view_policy = $app->getPolicy(DiffusionDefaultViewCapability::CAPABILITY); + $edit_policy = $app->getPolicy(DiffusionDefaultEditCapability::CAPABILITY); + $push_policy = $app->getPolicy(DiffusionDefaultPushCapability::CAPABILITY); return id(new PhabricatorRepository()) ->setViewPolicy($view_policy) @@ -1319,8 +1319,6 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO } - - /* -( PhabricatorPolicyInterface )----------------------------------------- */ @@ -1328,7 +1326,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO return array( PhabricatorPolicyCapability::CAN_VIEW, PhabricatorPolicyCapability::CAN_EDIT, - DiffusionCapabilityPush::CAPABILITY, + DiffusionPushCapability::CAPABILITY, ); } @@ -1338,7 +1336,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO return $this->getViewPolicy(); case PhabricatorPolicyCapability::CAN_EDIT: return $this->getEditPolicy(); - case DiffusionCapabilityPush::CAPABILITY: + case DiffusionPushCapability::CAPABILITY: return $this->getPushPolicy(); } } diff --git a/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php b/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php index 952a57100e..1f7fdf2864 100644 --- a/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php +++ b/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php @@ -57,7 +57,7 @@ final class PhabricatorSlowvoteApplication extends PhabricatorApplication { public function getCustomCapabilities() { return array( - PhabricatorSlowvoteCapabilityDefaultView::CAPABILITY => array( + PhabricatorSlowvoteDefaultViewCapability::CAPABILITY => array( 'caption' => pht('Default view policy for new polls.'), ), ); diff --git a/src/applications/slowvote/capability/PhabricatorSlowvoteCapabilityDefaultView.php b/src/applications/slowvote/capability/PhabricatorSlowvoteDefaultViewCapability.php similarity index 86% rename from src/applications/slowvote/capability/PhabricatorSlowvoteCapabilityDefaultView.php rename to src/applications/slowvote/capability/PhabricatorSlowvoteDefaultViewCapability.php index 4c5b1975df..ae5a49a627 100644 --- a/src/applications/slowvote/capability/PhabricatorSlowvoteCapabilityDefaultView.php +++ b/src/applications/slowvote/capability/PhabricatorSlowvoteDefaultViewCapability.php @@ -1,6 +1,6 @@ executeOne(); $view_policy = $app->getPolicy( - PhabricatorSlowvoteCapabilityDefaultView::CAPABILITY); + PhabricatorSlowvoteDefaultViewCapability::CAPABILITY); return id(new PhabricatorSlowvotePoll()) ->setAuthorPHID($actor->getPHID()) @@ -111,8 +111,7 @@ final class PhabricatorSlowvotePoll extends PhabricatorSlowvoteDAO } public function describeAutomaticCapability($capability) { - return pht( - 'The author of a poll can always view and edit it.'); + return pht('The author of a poll can always view and edit it.'); } @@ -140,5 +139,4 @@ final class PhabricatorSlowvotePoll extends PhabricatorSlowvoteDAO return array($this->getAuthorPHID()); } - }