Added a DISABLE_LOGOUT constant, to allow the logout command to be disabled, for support of external SSO solutions.
This commit is contained in:
@@ -55,9 +55,14 @@ class Auth extends Base
|
|||||||
*/
|
*/
|
||||||
public function logout()
|
public function logout()
|
||||||
{
|
{
|
||||||
|
if (! DISABLE_LOGOUT) {
|
||||||
$this->sessionManager->close();
|
$this->sessionManager->close();
|
||||||
$this->response->redirect($this->helper->url->to('auth', 'login'));
|
$this->response->redirect($this->helper->url->to('auth', 'login'));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$this->response->redirect($this->helper->url->to('auth', 'index'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redirect the user after the authentication
|
* Redirect the user after the authentication
|
||||||
|
|||||||
@@ -84,10 +84,12 @@
|
|||||||
<i class="fa fa-life-ring fa-fw"></i>
|
<i class="fa fa-life-ring fa-fw"></i>
|
||||||
<?= $this->url->link(t('Documentation'), 'doc', 'show') ?>
|
<?= $this->url->link(t('Documentation'), 'doc', 'show') ?>
|
||||||
</li>
|
</li>
|
||||||
|
<?php if (! DISABLE_LOGOUT): ?>
|
||||||
<li>
|
<li>
|
||||||
<i class="fa fa-sign-out fa-fw"></i>
|
<i class="fa fa-sign-out fa-fw"></i>
|
||||||
<?= $this->url->link(t('Logout'), 'auth', 'logout') ?>
|
<?= $this->url->link(t('Logout'), 'auth', 'logout') ?>
|
||||||
</li>
|
</li>
|
||||||
|
<?php endif ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -111,3 +111,6 @@ defined('HTTP_PROXY_HOSTNAME') or define('HTTP_PROXY_HOSTNAME', '');
|
|||||||
defined('HTTP_PROXY_PORT') or define('HTTP_PROXY_PORT', '3128');
|
defined('HTTP_PROXY_PORT') or define('HTTP_PROXY_PORT', '3128');
|
||||||
defined('HTTP_PROXY_USERNAME') or define('HTTP_PROXY_USERNAME', '');
|
defined('HTTP_PROXY_USERNAME') or define('HTTP_PROXY_USERNAME', '');
|
||||||
defined('HTTP_PROXY_PASSWORD') or define('HTTP_PROXY_PASSWORD', '');
|
defined('HTTP_PROXY_PASSWORD') or define('HTTP_PROXY_PASSWORD', '');
|
||||||
|
|
||||||
|
// Disabling logout (for external SSO authentication)
|
||||||
|
defined('DISABLE_LOGOUT') or define('DISABLE_LOGOUT', 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user