Don't authenticate to non-applications
authorMichael M Slusarz <slusarz@curecanti.org>
Sat, 9 Oct 2010 07:00:19 +0000 (01:00 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sat, 9 Oct 2010 07:20:06 +0000 (01:20 -0600)
framework/Core/lib/Horde/Core/Sidebar.php

index 278772a..54f0b54 100644 (file)
@@ -26,7 +26,7 @@ class Horde_Core_Sidebar
         $isAdmin = $registry->isAdmin();
         $menu = $parents = array();
 
-        foreach ($registry->listApps(array('active', 'admin', 'heading', 'notoolbar', 'sidebar'), true) as $app => $params) {
+        foreach ($registry->listApps(array('active', 'admin', 'heading', 'notoolbar', 'sidebar'), true, null) as $app => $params) {
             /* Check if the current user has permisson to see this
              * application, and if the application is active. Headings are
              * visible to everyone (but get filtered out later if they
@@ -34,8 +34,8 @@ class Horde_Core_Sidebar
              * applications except those marked 'inactive'. */
             if ($isAdmin ||
                 ($params['status'] == 'heading') ||
-                ($registry->hasPermission($app, Horde_Perms::SHOW) &&
-                 in_array($params['status'], array('active', 'sidebar')))) {
+                (in_array($params['status'], array('active', 'sidebar') &&
+                 $registry->hasPermission($app, Horde_Perms::SHOW)))) {
                 $menu[$app] = $params;
 
                 if (isset($params['menu_parent'])) {