mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-19 05:44:39 -04:00
Force default user before rendering login page (#4620)
This commit is contained in:
committed by
GitHub
parent
3d5b9ac902
commit
37cf233907
@@ -72,21 +72,22 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
|
||||
}
|
||||
|
||||
$auth_type = FreshRSS_Context::$system_conf->auth_type;
|
||||
FreshRSS_Context::initUser('_');
|
||||
switch ($auth_type) {
|
||||
case 'form':
|
||||
Minz_Request::forward(array('c' => 'auth', 'a' => 'formLogin'));
|
||||
break;
|
||||
case 'http_auth':
|
||||
Minz_Error::error(403, array('error' => array(_t('feedback.access.denied'),
|
||||
' [HTTP Remote-User=' . htmlspecialchars(httpAuthUser(), ENT_NOQUOTES, 'UTF-8') . ']'
|
||||
)), false);
|
||||
break;
|
||||
case 'none':
|
||||
// It should not happen!
|
||||
Minz_Error::error(404);
|
||||
default:
|
||||
// TODO load plugin instead
|
||||
Minz_Error::error(404);
|
||||
case 'form':
|
||||
Minz_Request::forward(array('c' => 'auth', 'a' => 'formLogin'));
|
||||
break;
|
||||
case 'http_auth':
|
||||
Minz_Error::error(403, array('error' => array(_t('feedback.access.denied'),
|
||||
' [HTTP Remote-User=' . htmlspecialchars(httpAuthUser(), ENT_NOQUOTES, 'UTF-8') . ']'
|
||||
)), false);
|
||||
break;
|
||||
case 'none':
|
||||
// It should not happen!
|
||||
Minz_Error::error(404);
|
||||
default:
|
||||
// TODO load plugin instead
|
||||
Minz_Error::error(404);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user