diff options
| author | 2013-12-29 02:12:46 +0100 | |
|---|---|---|
| committer | 2013-12-29 02:12:46 +0100 | |
| commit | 220341b40642771f9b5db97296edfb1913182464 (patch) | |
| tree | b773f9cdbc58df963a024639da5a89673147188c /app | |
| parent | 96bdbafceac44af2159e6b80d3d403e0608991d9 (diff) | |
Implémente sélecteur de méthode d’authentification
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126
Diffstat (limited to 'app')
| -rwxr-xr-x | app/Controllers/configureController.php | 7 | ||||
| -rw-r--r-- | app/views/configure/users.phtml | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index aabc3e4af..0c0b4951d 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -326,10 +326,13 @@ class FreshRSS_configure_Controller extends Minz_ActionController { Minz_Session::_param('mail', $this->view->conf->mail_login); if (Minz_Configuration::isAdmin()) { - $anon = (Minz_Request::param('anon_access', false)); + $anon = Minz_Request::param('anon_access', false); $anon = ((bool)$anon) && ($anon !== 'no'); - if ($anon != Minz_Configuration::allowAnonymous()) { + $auth_type = Minz_Request::param('auth_type', 'none'); + if ($anon != Minz_Configuration::allowAnonymous() || + $auth_type != Minz_Configuration::authType()) { Minz_Configuration::_allowAnonymous($anon); + Minz_Configuration::_authType($auth_type); $ok &= Minz_Configuration::writeFile(); } } diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml index 4fd291ba3..7e8edf9af 100644 --- a/app/views/configure/users.phtml +++ b/app/views/configure/users.phtml @@ -60,11 +60,10 @@ <label class="group-name" for="auth_type"><?php echo Minz_Translate::t('auth_type'); ?></label> <div class="group-controls"> <select id="auth_type" name="auth_type"> - <option value="none">None (dangerous)</option> - <option value="http_auth">HTTP Auth</option> - <option value="persona">Mozilla Persona</option> + <option value="none"<?php echo Minz_Configuration::authType() === 'none' ? ' selected="selected"' : ''; ?>>None (dangerous)</option> + <option value="http_auth"<?php echo Minz_Configuration::authType() === 'http_auth' ? ' selected="selected"' : ''; ?>>HTTP Auth</option> + <option value="persona"<?php echo Minz_Configuration::authType() === 'persona' ? ' selected="selected"' : ''; ?>>Mozilla Persona</option> </select> - (selector not implemented yet) </div> </div> |
