$perms = PERMS_SHOW)
{
$apps = array();
- $ahandler = defined('AUTH_HANDLER');
if (is_null($filter)) {
$filter = array('notoolbar', 'active');
}
foreach ($this->applications as $app => $params) {
if (in_array($params['status'], $filter) &&
- ($ahandler || $this->hasPermission($app, $perms))) {
+ $this->hasPermission($app, $perms)) {
$apps[$app] = $app;
}
}
*/
public function hasPermission($app, $perms = PERMS_READ)
{
- $this->_lastPerms = null;
-
- if (Horde_Auth::isAdmin()) {
- return true;
- }
-
- if ($GLOBALS['perms']->exists($app) &&
- !$GLOBALS['perms']->hasPermission($app, Horde_Auth::getAuth(), $perms)) {
- $this->_lastPerms = 'perms';
- return false;
- }
-
- return true;
+ return Horde_Auth::isAdmin() ||
+ !$GLOBALS['perms']->exists($app) ||
+ $GLOBALS['perms']->hasPermission($app, Horde_Auth::getAuth(), $perms);
}
/**
* @package Horde_Memcache
*/
-// No auth.
-@define('AUTH_HANDLER', true);
-
// Find the base file path of Horde.
@define('HORDE_BASE', dirname(__FILE__) . '/..');
$cli = &Horde_Cli::singleton();
$cli->init();
+// No auth.
+$horde_authentication = 'none';
require_once HORDE_BASE . '/lib/base.php';
/* Make sure there's no compression. */
* @package Horde_SessionHandler
*/
-// No auth.
-@define('AUTH_HANDLER', true);
-
// Find the base file path of Horde.
@define('HORDE_BASE', dirname(__FILE__) . '/..');
$cli = Horde_Cli::singleton();
$cli->init();
+// No auth.
+$horde_authentication = 'none';
require_once HORDE_BASE . '/lib/base.php';
/* Make sure there's no compression. */