From 92efd68a3a13e49fe7bbfb8441611c0dcd639415 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 30 Dec 2013 01:03:32 +0100 Subject: Début de mode multi-utilisateur avec http_auth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + Légère optimisation de Minz_View. + Encore plus de tests de bibliothèques dans install.php Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126 et https://github.com/marienfressinaud/FreshRSS/issues/303 --- lib/Minz/Configuration.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/Minz/Configuration.php') diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index d0c530ef7..e6d7ae471 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -107,6 +107,12 @@ class Minz_Configuration { public static function authType() { return self::$auth_type; } + public static function needsLogin() { + return self::$auth_type !== 'none'; + } + public static function canLogIn() { + return self::$auth_type === 'persona'; + } public static function _allowAnonymous($allow = false) { self::$allow_anonymous = (bool)$allow; @@ -114,13 +120,17 @@ class Minz_Configuration { public static function _authType($value) { $value = strtolower($value); switch ($value) { - case 'none': case 'http_auth': case 'persona': + case 'none': self::$auth_type = $value; break; } } + public static function _currentUser($user) { + self::$current_user = $user; + } + /** * Initialise les variables de configuration -- cgit v1.2.3