diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/NavigationManager.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index 16552005931..b854b44b340 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -216,7 +216,18 @@ class NavigationManager implements INavigationManager { if ($this->appManager === 'null') { return; } - foreach ($this->appManager->getInstalledApps() as $app) { + + if ($this->userSession->isLoggedIn()) { + $apps = $this->appManager->getEnabledAppsForUser($this->userSession->getUser()); + } else { + $apps = $this->appManager->getInstalledApps(); + } + + foreach ($apps as $app) { + if (!$this->userSession->isLoggedIn() && !$this->appManager->isEnabledForUser($app, $this->userSession->getUser())) { + continue; + } + // load plugins and collections from info.xml $info = $this->appManager->getAppInfo($app); if (empty($info['navigations'])) { |