1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-01 18:30:59 +01:00

People - add back "add new user" ui

Summary: This got clobbered in D11547. Revive the code but move it up from the base class to the PeopleList controller which is presumably all the main "admin" views. Fixes T7181.

Test Plan: Saw the button once more on /people/...!

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7181

Differential Revision: https://secure.phabricator.com/D11698
This commit is contained in:
Bob Trahan 2015-02-05 12:26:54 -08:00
parent 7213eb01e0
commit 69f06387cb

View file

@ -29,4 +29,21 @@ final class PhabricatorPeopleListController
return $this->delegateToController($controller); 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;
}
} }