Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / people / controller / PhabricatorPeopleListController.php
blob511899070c2bc4a506a03c9015ff232071c5ad8c
1 <?php
3 final class PhabricatorPeopleListController
4 extends PhabricatorPeopleController {
6 public function shouldAllowPublic() {
7 return true;
10 public function shouldRequireAdmin() {
11 return false;
14 public function handleRequest(AphrontRequest $request) {
15 $this->requireApplicationCapability(
16 PeopleBrowseUserDirectoryCapability::CAPABILITY);
18 $controller = id(new PhabricatorApplicationSearchController())
19 ->setQueryKey($request->getURIData('queryKey'))
20 ->setSearchEngine(new PhabricatorPeopleSearchEngine())
21 ->setNavigation($this->buildSideNavView());
23 return $this->delegateToController($controller);
26 protected function buildApplicationCrumbs() {
27 $crumbs = parent::buildApplicationCrumbs();
28 $viewer = $this->getRequest()->getUser();
30 if ($viewer->getIsAdmin()) {
31 $crumbs->addAction(
32 id(new PHUIListItemView())
33 ->setName(pht('Create New User'))
34 ->setHref($this->getApplicationURI('create/'))
35 ->setIcon('fa-plus-square'));
38 return $crumbs;