mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
Fix layout re-rendering after login (thank you, automerge)
This commit is contained in:
parent
864dc15514
commit
95189fbf46
@ -39,6 +39,7 @@ use Icinga\Logger\Logger;
|
|||||||
use Icinga\Exception\NotReadableError;
|
use Icinga\Exception\NotReadableError;
|
||||||
use Icinga\Exception\ConfigurationError;
|
use Icinga\Exception\ConfigurationError;
|
||||||
use Icinga\User;
|
use Icinga\User;
|
||||||
|
use Icinga\Web\Url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Application wide controller for authentication
|
* Application wide controller for authentication
|
||||||
@ -61,7 +62,10 @@ class AuthenticationController extends ActionController
|
|||||||
$this->view->form->setRequest($this->_request);
|
$this->view->form->setRequest($this->_request);
|
||||||
$this->view->title = 'Icinga Web Login';
|
$this->view->title = 'Icinga Web Login';
|
||||||
try {
|
try {
|
||||||
$redirectUrl = $this->_request->getParam('redirect', 'index?_render=body');
|
$redirectUrl = Url::fromPath($this->_request->getParam('redirect', 'dashboard'));
|
||||||
|
if ($this->_request->isXmlHttpRequest()) {
|
||||||
|
$redirectUrl->setParam('_render', 'layout');
|
||||||
|
}
|
||||||
$auth = AuthManager::getInstance();
|
$auth = AuthManager::getInstance();
|
||||||
if ($auth->isAuthenticated()) {
|
if ($auth->isAuthenticated()) {
|
||||||
$this->redirectNow($redirectUrl);
|
$this->redirectNow($redirectUrl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user