setBaseURI(new PhutilURI($this->getApplicationURI())); $is_admin = $this->getRequest()->getUser()->getIsAdmin(); if ($is_admin) { $nav->addLabel('Create Users'); $nav->addFilter('edit', 'Create New User'); $nav->addFilter('ldap', 'Import from LDAP'); $nav->addSpacer(); } $nav->addLabel('Directory'); $nav->addFilter('people', 'User Directory', $this->getApplicationURI()); if ($is_admin) { $nav->addSpacer(); $nav->addLabel('Logs'); $nav->addFilter('logs', 'Activity Logs'); } return $nav; } }