Skip to content
Snippets Groups Projects
Commit dba31130 authored by xamgore's avatar xamgore
Browse files

Smoker code style

parent e41b547c
Branches
Tags
No related merge requests found
......@@ -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);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment