mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-12 16:34:25 +02:00
ActionController: remove redirectToLogin default
The redirectOnLogin function now doesn't have any predefined default. This also leads to the behaviour that "Logout" will not redirect you anywhere on a new login while "forcibly being logged out" (e.g. by logging out in another browser tab) will bring you back to where you came from.
This commit is contained in:
parent
7334716d15
commit
db3ef8fbd0
@ -254,8 +254,10 @@ class ActionController extends Zend_Controller_Action
|
|||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
protected function redirectToLogin($afterLogin = '/dashboard')
|
protected function redirectToLogin($afterLogin = null)
|
||||||
{
|
{
|
||||||
|
$redir = null;
|
||||||
|
if ($afterLogin !== null) {
|
||||||
if (! $afterLogin instanceof Url) {
|
if (! $afterLogin instanceof Url) {
|
||||||
$afterLogin = Url::fromPath($afterLogin);
|
$afterLogin = Url::fromPath($afterLogin);
|
||||||
}
|
}
|
||||||
@ -265,7 +267,10 @@ class ActionController extends Zend_Controller_Action
|
|||||||
// TODO: Ignore /?
|
// TODO: Ignore /?
|
||||||
$redir = $afterLogin->getRelativeUrl();
|
$redir = $afterLogin->getRelativeUrl();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$url = Url::fromPath('authentication/login');
|
$url = Url::fromPath('authentication/login');
|
||||||
|
|
||||||
if ($redir) {
|
if ($redir) {
|
||||||
$url->setParam('redirect', $redir);
|
$url->setParam('redirect', $redir);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user