diff options
| author | 2014-03-08 20:16:10 +0100 | |
|---|---|---|
| committer | 2014-03-08 20:16:10 +0100 | |
| commit | 670ee57b6288549ac611d53d86d8f5ffee641b0e (patch) | |
| tree | 040598a6797d0d44a1f2533b536f5a7fb3cf8856 /app/Controllers | |
| parent | faa9a74324942e9be4682067208e1ef3a8f332a7 (diff) | |
Interface to enable/disable API and unsafe automatic login
https://github.com/marienfressinaud/FreshRSS/issues/13
https://github.com/marienfressinaud/FreshRSS/issues/440
Diffstat (limited to 'app/Controllers')
| -rw-r--r-- | app/Controllers/usersController.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/Controllers/usersController.php b/app/Controllers/usersController.php index b03989cd7..fa967cedc 100644 --- a/app/Controllers/usersController.php +++ b/app/Controllers/usersController.php @@ -69,13 +69,19 @@ class FreshRSS_users_Controller extends Minz_ActionController { $anon_refresh = Minz_Request::param('anon_refresh', false); $anon_refresh = ((bool)$anon_refresh) && ($anon_refresh !== 'no'); $auth_type = Minz_Request::param('auth_type', 'none'); + $unsafe_autologin = Minz_Request::param('unsafe_autologin', false); + $api_enabled = Minz_Request::param('api_enabled', false); if ($anon != Minz_Configuration::allowAnonymous() || $auth_type != Minz_Configuration::authType() || - $anon_refresh != Minz_Configuration::allowAnonymousRefresh()) { + $anon_refresh != Minz_Configuration::allowAnonymousRefresh() || + $unsafe_autologin != Minz_Configuration::unsafeAutologinEnabled() || + $api_enabled != Minz_Configuration::apiEnabled()) { Minz_Configuration::_authType($auth_type); Minz_Configuration::_allowAnonymous($anon); Minz_Configuration::_allowAnonymousRefresh($anon_refresh); + Minz_Configuration::_enableAutologin($unsafe_autologin); + Minz_Configuration::_enableApi($api_enabled); $ok &= Minz_Configuration::writeFile(); } } |
