Navigation: Load shared navigation items

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-07 13:22:36 +02:00
parent 27f3a8f152
commit f9441c91d5
1 changed files with 5 additions and 0 deletions

View File

@ -413,9 +413,14 @@ class Navigation implements ArrayAccess, Countable, IteratorAggregate
*/ */
public function load($type) public function load($type)
{ {
// Shareables
$this->merge(Icinga::app()->getSharedNavigation($type));
// User Preferences
$user = Auth::getInstance()->getUser(); $user = Auth::getInstance()->getUser();
$this->merge($user->getNavigation($type)); $this->merge($user->getNavigation($type));
// Modules
$moduleManager = Icinga::app()->getModuleManager(); $moduleManager = Icinga::app()->getModuleManager();
foreach ($moduleManager->getLoadedModules() as $module) { foreach ($moduleManager->getLoadedModules() as $module) {
if ($user->can($moduleManager::MODULE_PERMISSION_NS . $module->getName())) { if ($user->can($moduleManager::MODULE_PERMISSION_NS . $module->getName())) {