3 final class PhabricatorSpacesApplication
extends PhabricatorApplication
{
5 public function getBaseURI() {
9 public function getName() {
13 public function getShortDescription() {
14 return pht('Policy Namespaces');
17 public function getIcon() {
21 public function getTitleGlyph() {
22 return "\xE2\x97\x8B";
25 public function getFlavorText() {
26 return pht('Control access to groups of objects.');
29 public function getApplicationGroup() {
30 return self
::GROUP_UTILITIES
;
33 public function canUninstall() {
37 public function getHelpDocumentationArticles(PhabricatorUser
$viewer) {
40 'name' => pht('Spaces User Guide'),
41 'href' => PhabricatorEnv
::getDoclink('Spaces User Guide'),
46 public function getRemarkupRules() {
48 new PhabricatorSpacesRemarkupRule(),
52 public function getRoutes() {
54 '/S(?P<id>[1-9]\d*)' => 'PhabricatorSpacesViewController',
56 '(?:query/(?P<queryKey>[^/]+)/)?' => 'PhabricatorSpacesListController',
57 'create/' => 'PhabricatorSpacesEditController',
58 'edit/(?:(?P<id>\d+)/)?' => 'PhabricatorSpacesEditController',
59 '(?P<action>activate|archive)/(?P<id>\d+)/'
60 => 'PhabricatorSpacesArchiveController',
65 protected function getCustomCapabilities() {
67 PhabricatorSpacesCapabilityCreateSpaces
::CAPABILITY
=> array(
68 'default' => PhabricatorPolicies
::POLICY_ADMIN
,
70 PhabricatorSpacesCapabilityDefaultView
::CAPABILITY
=> array(
71 'caption' => pht('Default view policy for newly created spaces.'),
72 'template' => PhabricatorSpacesNamespacePHIDType
::TYPECONST
,
73 'capability' => PhabricatorPolicyCapability
::CAN_VIEW
,
75 PhabricatorSpacesCapabilityDefaultEdit
::CAPABILITY
=> array(
76 'caption' => pht('Default edit policy for newly created spaces.'),
77 'default' => PhabricatorPolicies
::POLICY_ADMIN
,
78 'template' => PhabricatorSpacesNamespacePHIDType
::TYPECONST
,
79 'capability' => PhabricatorPolicyCapability
::CAN_EDIT
,