Re-add check that got lost somehow and allowed guest access to all applications.
authorJan <jan@horde.org>
Mon, 31 May 2010 16:08:02 +0000 (17:08 +0100)
committerJan Schneider <jan@horde.org>
Mon, 31 May 2010 16:22:33 +0000 (18:22 +0200)
framework/Core/lib/Horde/Registry.php

index 8dd741e..c6de035 100644 (file)
@@ -1224,8 +1224,9 @@ class Horde_Registry
         /* Otherwise, allow access for admins, for apps that do not have any
          * explicit permissions, or for apps that allow the given permission. */
         return Horde_Auth::isAdmin() ||
-            !$GLOBALS['injector']->getInstance('Horde_Perms')->exists($app) ||
-            $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission($app, Horde_Auth::getAuth(), $perms);
+            ($GLOBALS['injector']->getInstance('Horde_Perms')->exists($app)
+             ? $GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission($app, Horde_Auth::getAuth(), $perms)
+             : (bool)Horde_Auth::getAuth());
     }
 
     /**