mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
a012595e3d
commit
f958a1c323
@ -413,9 +413,12 @@ class Navigation implements ArrayAccess, Countable, IteratorAggregate
|
|||||||
*/
|
*/
|
||||||
public function load($type)
|
public function load($type)
|
||||||
{
|
{
|
||||||
|
$user = Auth::getInstance()->getUser();
|
||||||
|
$this->merge($user->getNavigation($type));
|
||||||
|
|
||||||
$moduleManager = Icinga::app()->getModuleManager();
|
$moduleManager = Icinga::app()->getModuleManager();
|
||||||
foreach ($moduleManager->getLoadedModules() as $module) {
|
foreach ($moduleManager->getLoadedModules() as $module) {
|
||||||
if (Auth::getInstance()->hasPermission($moduleManager::MODULE_PERMISSION_NS . $module->getName())) {
|
if ($user->can($moduleManager::MODULE_PERMISSION_NS . $module->getName())) {
|
||||||
if ($type === 'menu-item') {
|
if ($type === 'menu-item') {
|
||||||
$this->merge($module->getMenu());
|
$this->merge($module->getMenu());
|
||||||
} elseif ($type === 'dashboard-pane') {
|
} elseif ($type === 'dashboard-pane') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user