mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
ActionController: Allow controllers to customize the login route
This commit is contained in:
parent
a4a0f9f5e6
commit
8a890a4a82
@ -41,6 +41,11 @@ use Icinga\Web\Window;
|
||||
*/
|
||||
class ActionController extends Zend_Controller_Action
|
||||
{
|
||||
/**
|
||||
* The login route to use when requiring authentication
|
||||
*/
|
||||
const LOGIN_ROUTE = 'authentication/login';
|
||||
|
||||
/**
|
||||
* Whether the controller requires the user to be authenticated
|
||||
*
|
||||
@ -370,7 +375,7 @@ class ActionController extends Zend_Controller_Action
|
||||
*/
|
||||
protected function redirectToLogin($redirect = null)
|
||||
{
|
||||
$login = Url::fromPath('authentication/login');
|
||||
$login = Url::fromPath(static::LOGIN_ROUTE);
|
||||
if ($this->isXhr()) {
|
||||
if ($redirect !== null) {
|
||||
$login->setParam('redirect', '__SELF__');
|
||||
|
Loading…
x
Reference in New Issue
Block a user