Differential D7498 Diff 16921 src/applications/harbormaster/application/PhabricatorApplicationHarbormaster.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/application/PhabricatorApplicationHarbormaster.php
Show All 38 Lines | final class PhabricatorApplicationHarbormaster extends PhabricatorApplication { | ||||
public function getRoutes() { | public function getRoutes() { | ||||
return array( | return array( | ||||
'/B(?P<id>[1-9]\d*)' => 'HarbormasterBuildableViewController', | '/B(?P<id>[1-9]\d*)' => 'HarbormasterBuildableViewController', | ||||
'/harbormaster/' => array( | '/harbormaster/' => array( | ||||
'(?:query/(?P<queryKey>[^/]+)/)?' | '(?:query/(?P<queryKey>[^/]+)/)?' | ||||
=> 'HarbormasterBuildableListController', | => 'HarbormasterBuildableListController', | ||||
'buildable/' => array( | 'buildable/' => array( | ||||
'edit/(?:(?P<id>\d+)/)?' => 'HarbormasterBuildableEditController', | 'edit/(?:(?P<id>\d+)/)?' => 'HarbormasterBuildableEditController', | ||||
'apply/(?:(?P<id>\d+)/)?' => 'HarbormasterBuildableApplyController', | |||||
), | ), | ||||
'plan/' => array( | 'plan/' => array( | ||||
'(?:query/(?P<queryKey>[^/]+)/)?' | '(?:query/(?P<queryKey>[^/]+)/)?' | ||||
=> 'HarbormasterPlanListController', | => 'HarbormasterPlanListController', | ||||
'edit/(?:(?P<id>\d+)/)?' => 'HarbormasterPlanEditController', | 'edit/(?:(?P<id>\d+)/)?' => 'HarbormasterPlanEditController', | ||||
'(?P<id>\d+)/' => 'HarbormasterPlanViewController', | '(?P<id>\d+)/' => 'HarbormasterPlanViewController', | ||||
'execute/(?P<id>\d+)/' => 'HarbormasterPlanExecuteController', | |||||
), | ), | ||||
), | ), | ||||
); | ); | ||||
} | } | ||||
public function getCustomCapabilities() { | public function getCustomCapabilities() { | ||||
return array( | return array( | ||||
HarbormasterCapabilityManagePlans::CAPABILITY => array( | HarbormasterCapabilityManagePlans::CAPABILITY => array( | ||||
'caption' => pht('Can create and manage build plans.'), | 'caption' => pht('Can create and manage build plans.'), | ||||
'default' => PhabricatorPolicies::POLICY_ADMIN, | 'default' => PhabricatorPolicies::POLICY_ADMIN, | ||||
), | ), | ||||
); | ); | ||||
} | } | ||||
} | } |