From feea26e4762a5ad60d43901a2ab141ef38ff8fe9 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 1 Jun 2010 02:51:25 -0600 Subject: [PATCH] Move requireAuth() from horde/Auth to horde/Core --- framework/Auth/lib/Horde/Auth.php | 17 ----------------- framework/Core/lib/Horde/Registry.php | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/framework/Auth/lib/Horde/Auth.php b/framework/Auth/lib/Horde/Auth.php index f145be26e..f1634ed78 100644 --- a/framework/Auth/lib/Horde/Auth.php +++ b/framework/Auth/lib/Horde/Auth.php @@ -366,23 +366,6 @@ class Horde_Auth } /** - * Checks if an application requires additional authentication above and - * beyond Horde authentication. - * - * @params string $app The application to check. - * - * @return boolean Whether or not the application required additional - * authentication. - * @throws Horde_Auth_Exception - */ - static public function requireAuth($app) - { - return ($app == 'horde') - ? false - : $GLOBALS['injector']->getInstance('Horde_Auth')->getOb('application', array('app' => $app))->requireAuth(); - } - - /** * Check existing auth for triggers that might invalidate it. * * @return boolean Is existing auth valid? diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index ac48f7f01..40cb7920c 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -1217,7 +1217,7 @@ class Horde_Registry * application auth != Horde admin auth. And there can *never* be * non-SHOW access to an application that requires authentication. */ if (!Horde_Auth::isAuthenticated(array('app' => $app)) && - Horde_Auth::requireAuth($app) && + $this->requireAuth($app) && ($perms != Horde_Perms::SHOW)) { return false; } @@ -1620,4 +1620,21 @@ class Horde_Registry : false; } + /** + * Checks if an application requires additional authentication above and + * beyond Horde authentication. + * + * @params string $app The application to check. + * + * @return boolean Whether or not the application required additional + * authentication. + * @throws Horde_Exception + */ + public function requireAuth($app) + { + return ($app == 'horde') + ? false + : $GLOBALS['injector']->getInstance('Horde_Auth')->getOb('application', array('app' => $app))->requireAuth(); + } + } -- 2.11.0