Page MenuHomePhorge

D25685.1734735889.diff
No OneTemporary

D25685.1734735889.diff

diff --git a/src/applications/people/controller/PhabricatorPeopleController.php b/src/applications/people/controller/PhabricatorPeopleController.php
--- a/src/applications/people/controller/PhabricatorPeopleController.php
+++ b/src/applications/people/controller/PhabricatorPeopleController.php
@@ -11,17 +11,31 @@
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
$name = null;
+ $viewer = $this->getRequest()->getUser();
if ($for_app) {
$name = $this->getRequest()->getURIData('username');
if ($name) {
$nav->setBaseURI(new PhutilURI('/p/'));
$nav->addFilter("{$name}/", $name);
$nav->addFilter("{$name}/calendar/", pht('Calendar'));
+ if ($viewer->getIsAdmin()) {
+ $user = id(new PhabricatorPeopleQuery())
+ ->setViewer(PhabricatorUser::getOmnipotentUser())
+ ->withUsernames(array($name))
+ ->needUserSettings(false)
+ ->executeOne();
+ $user_id = $user->getID();
+ if ($user_id) {
+ $user_manage_uri = id(new PhutilURI(
+ $this->getApplicationURI('manage/'.$user_id.'/')));
+ $nav->addFilter('manage', pht('Manage %s', $name),
+ $user_manage_uri);
+ }
+ }
}
}
if (!$name) {
- $viewer = $this->getRequest()->getUser();
id(new PhabricatorPeopleSearchEngine())
->setViewer($viewer)
->addNavigationItems($nav->getMenu());

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 23:04 (17 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1021292
Default Alt Text
D25685.1734735889.diff (1 KB)

Event Timeline