diff options
Diffstat (limited to 'lib/Minz/Configuration.php')
| -rw-r--r-- | lib/Minz/Configuration.php | 12 |
1 files changed, 11 insertions, 1 deletions
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 |
