Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / people / application / PhabricatorPeopleApplication.php
blob86c03fdf4b5f059f78e2773ff73805f1bd3cf03c
1 <?php
3 final class PhabricatorPeopleApplication extends PhabricatorApplication {
5 public function getName() {
6 return pht('People');
9 public function getShortDescription() {
10 return pht('User Accounts and Profiles');
13 public function getBaseURI() {
14 return '/people/';
17 public function getTitleGlyph() {
18 return "\xE2\x99\x9F";
21 public function getIcon() {
22 return 'fa-users';
25 public function isPinnedByDefault(PhabricatorUser $viewer) {
26 return $viewer->getIsAdmin();
29 public function getFlavorText() {
30 return pht('Sort of a social utility.');
33 public function getApplicationGroup() {
34 return self::GROUP_UTILITIES;
37 public function canUninstall() {
38 return false;
41 public function getRoutes() {
42 return array(
43 '/people/' => array(
44 $this->getQueryRoutePattern() => 'PhabricatorPeopleListController',
45 'logs/' => array(
46 $this->getQueryRoutePattern() => 'PhabricatorPeopleLogsController',
47 '(?P<id>\d+)/' => 'PhabricatorPeopleLogViewController',
49 'invite/' => array(
50 '(?:query/(?P<queryKey>[^/]+)/)?'
51 => 'PhabricatorPeopleInviteListController',
52 'send/'
53 => 'PhabricatorPeopleInviteSendController',
55 'approve/(?P<id>[1-9]\d*)/(?:via/(?P<via>[^/]+)/)?'
56 => 'PhabricatorPeopleApproveController',
57 '(?P<via>disapprove)/(?P<id>[1-9]\d*)/'
58 => 'PhabricatorPeopleDisableController',
59 '(?P<via>disable)/(?P<id>[1-9]\d*)/'
60 => 'PhabricatorPeopleDisableController',
61 'empower/(?P<id>[1-9]\d*)/' => 'PhabricatorPeopleEmpowerController',
62 'delete/(?P<id>[1-9]\d*)/' => 'PhabricatorPeopleDeleteController',
63 'rename/(?P<id>[1-9]\d*)/' => 'PhabricatorPeopleRenameController',
64 'welcome/(?P<id>[1-9]\d*)/' => 'PhabricatorPeopleWelcomeController',
65 'create/' => 'PhabricatorPeopleCreateController',
66 'new/(?P<type>[^/]+)/' => 'PhabricatorPeopleNewController',
67 'editprofile/(?P<id>[1-9]\d*)/' =>
68 'PhabricatorPeopleProfileEditController',
69 'badges/(?P<id>[1-9]\d*)/' =>
70 'PhabricatorPeopleProfileBadgesController',
71 'tasks/(?P<id>[1-9]\d*)/' =>
72 'PhabricatorPeopleProfileTasksController',
73 'commits/(?P<id>[1-9]\d*)/' =>
74 'PhabricatorPeopleProfileCommitsController',
75 'revisions/(?P<id>[1-9]\d*)/' =>
76 'PhabricatorPeopleProfileRevisionsController',
77 'picture/(?P<id>[1-9]\d*)/' =>
78 'PhabricatorPeopleProfilePictureController',
79 'manage/(?P<id>[1-9]\d*)/' =>
80 'PhabricatorPeopleProfileManageController',
82 '/p/(?P<username>[\w._-]+)/' => array(
83 '' => 'PhabricatorPeopleProfileViewController',
88 public function getRemarkupRules() {
89 return array(
90 new PhabricatorMentionRemarkupRule(),
94 protected function getCustomCapabilities() {
95 return array(
96 PeopleCreateUsersCapability::CAPABILITY => array(
97 'default' => PhabricatorPolicies::POLICY_ADMIN,
99 PeopleDisableUsersCapability::CAPABILITY => array(
100 'default' => PhabricatorPolicies::POLICY_ADMIN,
102 PeopleBrowseUserDirectoryCapability::CAPABILITY => array(),
106 public function getApplicationSearchDocumentTypes() {
107 return array(
108 PhabricatorPeopleUserPHIDType::TYPECONST,