Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F26446008
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
View Options
diff --git a/src/applications/people/controller/PhabricatorPeopleListController.php b/src/applications/people/controller/PhabricatorPeopleListController.php
index 3888ddfa8..a4d23cc85 100644
--- a/src/applications/people/controller/PhabricatorPeopleListController.php
+++ b/src/applications/people/controller/PhabricatorPeopleListController.php
@@ -1,32 +1,49 @@
<?php
final class PhabricatorPeopleListController
extends PhabricatorPeopleController {
private $key;
public function shouldAllowPublic() {
return true;
}
public function shouldRequireAdmin() {
return false;
}
public function willProcessRequest(array $data) {
$this->key = idx($data, 'key');
}
public function processRequest() {
$this->requireApplicationCapability(
PeopleBrowseUserDirectoryCapability::CAPABILITY);
$controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($this->key)
->setSearchEngine(new PhabricatorPeopleSearchEngine())
->setNavigation($this->buildSideNavView());
return $this->delegateToController($controller);
}
+ protected function buildApplicationCrumbs() {
+ $crumbs = parent::buildApplicationCrumbs();
+ $viewer = $this->getRequest()->getUser();
+
+ $can_create = $this->hasApplicationCapability(
+ PeopleCreateUsersCapability::CAPABILITY);
+ $crumbs->addAction(
+ id(new PHUIListItemView())
+ ->setName(pht('Create New User'))
+ ->setHref($this->getApplicationURI('create/'))
+ ->setDisabled(!$can_create)
+ ->setIcon('fa-plus-square'));
+
+ return $crumbs;
+ }
+
+
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jul 17, 12:20 AM (1 h, 36 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3f/f9/25fd74e2fdd5f363b084cfc56be4
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment