mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-28 02:08:31 -04:00
Add possibility to anonymous to refresh feeds
Obviously, it's optional! (and deactivate by default) Need some more tests? See #351
This commit is contained in:
@@ -54,11 +54,16 @@ class FreshRSS_users_Controller extends Minz_ActionController {
|
||||
|
||||
$anon = Minz_Request::param('anon_access', false);
|
||||
$anon = ((bool)$anon) && ($anon !== 'no');
|
||||
$anon_refresh = Minz_Request::param('anon_refresh', false);
|
||||
$anon_refresh = ((bool)$anon_refresh) && ($anon_refresh !== 'no');
|
||||
$auth_type = Minz_Request::param('auth_type', 'none');
|
||||
if ($anon != Minz_Configuration::allowAnonymous() ||
|
||||
$auth_type != Minz_Configuration::authType()) {
|
||||
$auth_type != Minz_Configuration::authType() ||
|
||||
$anon_refresh != Minz_Configuration::allowAnonymousRefresh()) {
|
||||
|
||||
Minz_Configuration::_authType($auth_type);
|
||||
Minz_Configuration::_allowAnonymous($anon);
|
||||
Minz_Configuration::_allowAnonymousRefresh($anon_refresh);
|
||||
$ok &= Minz_Configuration::writeFile();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user