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:
Marien Fressinaud
2014-02-13 21:45:25 +01:00
parent b77d9c60ac
commit 4dd673157b
7 changed files with 42 additions and 4 deletions

View File

@@ -7,7 +7,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$token_param = Minz_Request::param ('token', '');
$token_is_ok = ($token != '' && $token == $token_param);
$action = Minz_Request::actionName ();
if (!($token_is_ok && $action === 'actualize')) {
if (!(($token_is_ok || Minz_Configuration::allowAnonymousRefresh()) &&
$action === 'actualize')
) {
Minz_Error::error (
403,
array ('error' => array (Minz_Translate::t ('access_denied')))