diff --git a/~dev_rating/application/classes/Controller/Environment/Office.php b/~dev_rating/application/classes/Controller/Environment/Office.php index ed58820d8b02a9fbac383f9c3435c74823ccd201..84cf02a91ea6438efaff88d983557100aa6fdfc2 100644 --- a/~dev_rating/application/classes/Controller/Environment/Office.php +++ b/~dev_rating/application/classes/Controller/Environment/Office.php @@ -14,14 +14,12 @@ class Controller_Environment_Office extends Controller_Environment_User $this->user->checkAccess(User::RIGHTS_DEAN | User::RIGHTS_ADMIN); // todo: move to twig - - - $menu = []; - if ($this->user->isAdmin()) { - $menu = Model_System::loadConfig('sidePanel/admin.json'); - } elseif ($this->user->isDean()) { - $menu = Model_System::loadConfig('sidePanel/dean.json'); - } + $menu = Model_System::loadConfig( + $this->user->isAdmin() + ? 'sidePanel/admin.json' + : $this->user->isDean() + ? 'sidePanel/dean.json' + : []); $this->twig->set_global('SidePanel', $menu); }