diff options
| author | 2014-01-19 22:25:49 +0100 | |
|---|---|---|
| committer | 2014-01-19 22:25:49 +0100 | |
| commit | 4e4b0f717fe0a8378e2b751393a8c19d1ada6eb2 (patch) | |
| tree | 6b268cfe46eb3eee8ebaddcd1e17067eaca0214f /lib/Minz/Configuration.php | |
| parent | 12e0b6b094041fc22937520b3218e4f61915fd50 (diff) | |
| parent | 79d4893fc792119c390d2f744246df210b74f637 (diff) | |
Merge remote-tracking branch 'origin/dev' into beta
Diffstat (limited to 'lib/Minz/Configuration.php')
| -rw-r--r-- | lib/Minz/Configuration.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index 2c30661ed..72e2cedc0 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -109,21 +109,23 @@ class Minz_Configuration { return self::$auth_type !== 'none'; } public static function canLogIn() { - return self::$auth_type === 'persona'; + return self::$auth_type === 'form' || self::$auth_type === 'persona'; } public static function _allowAnonymous($allow = false) { - self::$allow_anonymous = (bool)$allow; + self::$allow_anonymous = ((bool)$allow) && self::canLogIn(); } public static function _authType($value) { $value = strtolower($value); switch ($value) { + case 'form': case 'http_auth': case 'persona': case 'none': self::$auth_type = $value; break; } + self::_allowAnonymous(self::$allow_anonymous); } /** @@ -251,12 +253,12 @@ class Minz_Configuration { if (isset ($general['default_user'])) { self::$default_user = $general['default_user']; } - if (isset ($general['allow_anonymous'])) { - self::$allow_anonymous = ((bool)($general['allow_anonymous'])) && ($general['allow_anonymous'] !== 'no'); - } if (isset ($general['auth_type'])) { self::_authType($general['auth_type']); } + if (isset ($general['allow_anonymous'])) { + self::$allow_anonymous = ((bool)($general['allow_anonymous'])) && ($general['allow_anonymous'] !== 'no'); + } // Base de données if (isset ($ini_array['db'])) { |
