Add "Spaces", an application for managing policy namespaces
Summary: Ref T3820. This doesn't actually do anything yet, but dumps in all the plumbing.
Test Plan:
{F156989}
{F156990}
{F156991}
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: eadler, wienczny, jdloft, devurandom, thz, hwinkel, 20after4, sascha-egerer, seporaitis, joshuaspence, chad, epriestley
Maniphest Tasks: T3820
Differential Revision: https://secure.phabricator.com/D9204
2015-06-01 11:28:38 -07:00
|
|
|
<?php
|
|
|
|
|
|
2015-06-01 14:54:18 -07:00
|
|
|
final class PhabricatorSpacesApplication extends PhabricatorApplication {
|
Add "Spaces", an application for managing policy namespaces
Summary: Ref T3820. This doesn't actually do anything yet, but dumps in all the plumbing.
Test Plan:
{F156989}
{F156990}
{F156991}
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: eadler, wienczny, jdloft, devurandom, thz, hwinkel, 20after4, sascha-egerer, seporaitis, joshuaspence, chad, epriestley
Maniphest Tasks: T3820
Differential Revision: https://secure.phabricator.com/D9204
2015-06-01 11:28:38 -07:00
|
|
|
|
|
|
|
|
public function getBaseURI() {
|
|
|
|
|
return '/spaces/';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getName() {
|
|
|
|
|
return pht('Spaces');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getShortDescription() {
|
|
|
|
|
return pht('Policy Namespaces');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getFontIcon() {
|
2015-06-05 10:42:49 -07:00
|
|
|
return 'fa-th-large';
|
Add "Spaces", an application for managing policy namespaces
Summary: Ref T3820. This doesn't actually do anything yet, but dumps in all the plumbing.
Test Plan:
{F156989}
{F156990}
{F156991}
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: eadler, wienczny, jdloft, devurandom, thz, hwinkel, 20after4, sascha-egerer, seporaitis, joshuaspence, chad, epriestley
Maniphest Tasks: T3820
Differential Revision: https://secure.phabricator.com/D9204
2015-06-01 11:28:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getTitleGlyph() {
|
|
|
|
|
return "\xE2\x97\x8B";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getFlavorText() {
|
|
|
|
|
return pht('Control access to groups of objects.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getApplicationGroup() {
|
|
|
|
|
return self::GROUP_UTILITIES;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function canUninstall() {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function isPrototype() {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-11 10:13:47 -07:00
|
|
|
public function getHelpDocumentationArticles(PhabricatorUser $viewer) {
|
|
|
|
|
return array(
|
|
|
|
|
array(
|
|
|
|
|
'name' => pht('Spaces User Guide'),
|
|
|
|
|
'href' => PhabricatorEnv::getDoclink('Spaces User Guide'),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-05 14:19:40 -07:00
|
|
|
public function getRemarkupRules() {
|
|
|
|
|
return array(
|
|
|
|
|
new PhabricatorSpacesRemarkupRule(),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
Add "Spaces", an application for managing policy namespaces
Summary: Ref T3820. This doesn't actually do anything yet, but dumps in all the plumbing.
Test Plan:
{F156989}
{F156990}
{F156991}
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: eadler, wienczny, jdloft, devurandom, thz, hwinkel, 20after4, sascha-egerer, seporaitis, joshuaspence, chad, epriestley
Maniphest Tasks: T3820
Differential Revision: https://secure.phabricator.com/D9204
2015-06-01 11:28:38 -07:00
|
|
|
public function getRoutes() {
|
|
|
|
|
return array(
|
|
|
|
|
'/S(?P<id>[1-9]\d*)' => 'PhabricatorSpacesViewController',
|
|
|
|
|
'/spaces/' => array(
|
|
|
|
|
'(?:query/(?P<queryKey>[^/]+)/)?' => 'PhabricatorSpacesListController',
|
|
|
|
|
'create/' => 'PhabricatorSpacesEditController',
|
|
|
|
|
'edit/(?:(?P<id>\d+)/)?' => 'PhabricatorSpacesEditController',
|
2015-06-11 10:13:47 -07:00
|
|
|
'(?P<action>activate|archive)/(?P<id>\d+)/'
|
|
|
|
|
=> 'PhabricatorSpacesArchiveController',
|
Add "Spaces", an application for managing policy namespaces
Summary: Ref T3820. This doesn't actually do anything yet, but dumps in all the plumbing.
Test Plan:
{F156989}
{F156990}
{F156991}
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: eadler, wienczny, jdloft, devurandom, thz, hwinkel, 20after4, sascha-egerer, seporaitis, joshuaspence, chad, epriestley
Maniphest Tasks: T3820
Differential Revision: https://secure.phabricator.com/D9204
2015-06-01 11:28:38 -07:00
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function getCustomCapabilities() {
|
|
|
|
|
return array(
|
|
|
|
|
PhabricatorSpacesCapabilityCreateSpaces::CAPABILITY => array(
|
|
|
|
|
'default' => PhabricatorPolicies::POLICY_ADMIN,
|
|
|
|
|
),
|
|
|
|
|
PhabricatorSpacesCapabilityDefaultView::CAPABILITY => array(
|
|
|
|
|
'caption' => pht('Default view policy for newly created spaces.'),
|
|
|
|
|
),
|
|
|
|
|
PhabricatorSpacesCapabilityDefaultEdit::CAPABILITY => array(
|
|
|
|
|
'caption' => pht('Default edit policy for newly created spaces.'),
|
|
|
|
|
'default' => PhabricatorPolicies::POLICY_ADMIN,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|