diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index c1a347589c..6d99772cef 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -2218,7 +2218,7 @@ celerity_register_resource_map(array( ), 'javelin-event' => array( - 'uri' => '/res/69d99d9f/rsrc/js/javelin/core/Event.js', + 'uri' => '/res/73201bd3/rsrc/js/javelin/core/Event.js', 'type' => 'js', 'requires' => array( @@ -3860,7 +3860,7 @@ celerity_register_resource_map(array( 'uri' => '/res/pkg/f96657b8/diffusion.pkg.js', 'type' => 'js', ), - 'cd1d650a' => + 'fe22443b' => array( 'name' => 'javelin.pkg.js', 'symbols' => @@ -3885,7 +3885,7 @@ celerity_register_resource_map(array( 17 => 'javelin-typeahead-ondemand-source', 18 => 'javelin-tokenizer', ), - 'uri' => '/res/pkg/cd1d650a/javelin.pkg.js', + 'uri' => '/res/pkg/fe22443b/javelin.pkg.js', 'type' => 'js', ), 'c41b4907' => @@ -3945,7 +3945,7 @@ celerity_register_resource_map(array( 'global-drag-and-drop-css' => '139bc58e', 'inline-comment-summary-css' => '8aaacd1b', 'javelin-aphlict' => '95ceba95', - 'javelin-behavior' => 'cd1d650a', + 'javelin-behavior' => 'fe22443b', 'javelin-behavior-aphlict-dropdown' => '95ceba95', 'javelin-behavior-aphlict-listen' => '95ceba95', 'javelin-behavior-aphront-basic-tokenizer' => '95ceba95', @@ -3996,24 +3996,24 @@ celerity_register_resource_map(array( 'javelin-behavior-repository-crossreference' => '322728f3', 'javelin-behavior-toggle-class' => '95ceba95', 'javelin-behavior-workflow' => '95ceba95', - 'javelin-dom' => 'cd1d650a', - 'javelin-event' => 'cd1d650a', - 'javelin-install' => 'cd1d650a', - 'javelin-json' => 'cd1d650a', - 'javelin-mask' => 'cd1d650a', - 'javelin-request' => 'cd1d650a', - 'javelin-resource' => 'cd1d650a', - 'javelin-stratcom' => 'cd1d650a', - 'javelin-tokenizer' => 'cd1d650a', - 'javelin-typeahead' => 'cd1d650a', - 'javelin-typeahead-normalizer' => 'cd1d650a', - 'javelin-typeahead-ondemand-source' => 'cd1d650a', - 'javelin-typeahead-preloaded-source' => 'cd1d650a', - 'javelin-typeahead-source' => 'cd1d650a', - 'javelin-uri' => 'cd1d650a', - 'javelin-util' => 'cd1d650a', - 'javelin-vector' => 'cd1d650a', - 'javelin-workflow' => 'cd1d650a', + 'javelin-dom' => 'fe22443b', + 'javelin-event' => 'fe22443b', + 'javelin-install' => 'fe22443b', + 'javelin-json' => 'fe22443b', + 'javelin-mask' => 'fe22443b', + 'javelin-request' => 'fe22443b', + 'javelin-resource' => 'fe22443b', + 'javelin-stratcom' => 'fe22443b', + 'javelin-tokenizer' => 'fe22443b', + 'javelin-typeahead' => 'fe22443b', + 'javelin-typeahead-normalizer' => 'fe22443b', + 'javelin-typeahead-ondemand-source' => 'fe22443b', + 'javelin-typeahead-preloaded-source' => 'fe22443b', + 'javelin-typeahead-source' => 'fe22443b', + 'javelin-uri' => 'fe22443b', + 'javelin-util' => 'fe22443b', + 'javelin-vector' => 'fe22443b', + 'javelin-workflow' => 'fe22443b', 'lightbox-attachment-css' => '139bc58e', 'maniphest-task-summary-css' => 'c41b4907', 'maniphest-transaction-detail-css' => 'c41b4907', diff --git a/src/applications/people/controller/PhabricatorPeopleController.php b/src/applications/people/controller/PhabricatorPeopleController.php index 1fb3ef2279..9894b5f70e 100644 --- a/src/applications/people/controller/PhabricatorPeopleController.php +++ b/src/applications/people/controller/PhabricatorPeopleController.php @@ -2,27 +2,25 @@ abstract class PhabricatorPeopleController extends PhabricatorController { + public function shouldRequireAdmin() { + return true; + } + public function buildSideNavView() { $nav = new AphrontSideNavFilterView(); $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); - $is_admin = $this->getRequest()->getUser()->getIsAdmin(); - - if ($is_admin) { - $nav->addLabel(pht('User Administration')); - $nav->addFilter('edit', pht('Create New User')); - if (PhabricatorEnv::getEnvConfig('ldap.auth-enabled') === true) { - $nav->addFilter('ldap', pht('Import from LDAP')); - } + $nav->addLabel(pht('User Administration')); + $nav->addFilter('edit', pht('Create New User')); + if (PhabricatorEnv::getEnvConfig('ldap.auth-enabled') === true) { + $nav->addFilter('ldap', pht('Import from LDAP')); } $nav->addFilter('people', pht('User Directory'), $this->getApplicationURI()); - if ($is_admin) { - $nav->addFilter('logs', pht('Activity Logs')); - } + $nav->addFilter('logs', pht('Activity Logs')); return $nav; } @@ -33,16 +31,12 @@ abstract class PhabricatorPeopleController extends PhabricatorController { public function buildApplicationCrumbs() { $crumbs = parent::buildApplicationCrumbs(); - // I'm sure this copypasty is wrong. - $is_admin = $this->getRequest()->getUser()->getIsAdmin(); - if ($is_admin) { - $crumbs->addAction( - id(new PhabricatorMenuItemView()) - ->setName(pht('Create New User')) - ->setHref($this->getApplicationURI('edit')) - ->setIcon('create')); - } + $crumbs->addAction( + id(new PhabricatorMenuItemView()) + ->setName(pht('Create New User')) + ->setHref($this->getApplicationURI('edit')) + ->setIcon('create')); return $crumbs; } diff --git a/src/applications/people/controller/PhabricatorPeopleEditController.php b/src/applications/people/controller/PhabricatorPeopleEditController.php index 3ac39fdfcd..ba19ba0b19 100644 --- a/src/applications/people/controller/PhabricatorPeopleEditController.php +++ b/src/applications/people/controller/PhabricatorPeopleEditController.php @@ -3,10 +3,6 @@ final class PhabricatorPeopleEditController extends PhabricatorPeopleController { - public function shouldRequireAdmin() { - return true; - } - private $id; private $view; diff --git a/src/applications/people/controller/PhabricatorPeopleLdapController.php b/src/applications/people/controller/PhabricatorPeopleLdapController.php index 3e2e28f4d8..48ed98d904 100644 --- a/src/applications/people/controller/PhabricatorPeopleLdapController.php +++ b/src/applications/people/controller/PhabricatorPeopleLdapController.php @@ -3,10 +3,6 @@ final class PhabricatorPeopleLdapController extends PhabricatorPeopleController { - public function shouldRequireAdmin() { - return true; - } - private $view; public function processRequest() { diff --git a/src/applications/people/controller/PhabricatorPeopleListController.php b/src/applications/people/controller/PhabricatorPeopleListController.php index ee7dd160b7..05d79b6487 100644 --- a/src/applications/people/controller/PhabricatorPeopleListController.php +++ b/src/applications/people/controller/PhabricatorPeopleListController.php @@ -46,18 +46,16 @@ final class PhabricatorPeopleListController phabricator_time($user->getDateCreated(), $viewer))) ->addAttribute($email); - if ($is_admin) { - if ($user->getIsDisabled()) { - $item->addIcon('disable', pht('Disabled')); - } + if ($user->getIsDisabled()) { + $item->addIcon('disable', pht('Disabled')); + } - if ($user->getIsAdmin()) { - $item->addIcon('highlight', pht('Admin')); - } + if ($user->getIsAdmin()) { + $item->addIcon('highlight', pht('Admin')); + } - if ($user->getIsSystemAgent()) { - $item->addIcon('computer', pht('System Agent')); - } + if ($user->getIsSystemAgent()) { + $item->addIcon('computer', pht('System Agent')); } $list->addItem($item); diff --git a/src/applications/people/controller/PhabricatorPeopleLogsController.php b/src/applications/people/controller/PhabricatorPeopleLogsController.php index 5436835a12..9776e862e4 100644 --- a/src/applications/people/controller/PhabricatorPeopleLogsController.php +++ b/src/applications/people/controller/PhabricatorPeopleLogsController.php @@ -3,10 +3,6 @@ final class PhabricatorPeopleLogsController extends PhabricatorPeopleController { - public function shouldRequireAdmin() { - return true; - } - public function processRequest() { $request = $this->getRequest(); $user = $request->getUser(); diff --git a/src/applications/people/controller/PhabricatorPeopleProfileController.php b/src/applications/people/controller/PhabricatorPeopleProfileController.php index 5fe8ceb07b..50000f3467 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileController.php @@ -7,6 +7,12 @@ final class PhabricatorPeopleProfileController private $page; private $profileUser; + public function shouldRequireAdmin() { + // Default for people app is true + // We desire public access here + return false; + } + public function willProcessRequest(array $data) { $this->username = idx($data, 'username'); $this->page = idx($data, 'page');