Added a DISABLE_LOGOUT constant, to allow the logout command to be disabled, for support of external SSO solutions.
This commit is contained in:
parent
77ae92b09b
commit
773bf36733
|
|
@ -55,8 +55,13 @@ class Auth extends Base
|
|||
*/
|
||||
public function logout()
|
||||
{
|
||||
$this->sessionManager->close();
|
||||
$this->response->redirect($this->helper->url->to('auth', 'login'));
|
||||
if (! DISABLE_LOGOUT) {
|
||||
$this->sessionManager->close();
|
||||
$this->response->redirect($this->helper->url->to('auth', 'login'));
|
||||
}
|
||||
else {
|
||||
$this->response->redirect($this->helper->url->to('auth', 'index'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -84,13 +84,15 @@
|
|||
<i class="fa fa-life-ring fa-fw"></i>
|
||||
<?= $this->url->link(t('Documentation'), 'doc', 'show') ?>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-sign-out fa-fw"></i>
|
||||
<?= $this->url->link(t('Logout'), 'auth', 'logout') ?>
|
||||
</li>
|
||||
<?php if (! DISABLE_LOGOUT): ?>
|
||||
<li>
|
||||
<i class="fa fa-sign-out fa-fw"></i>
|
||||
<?= $this->url->link(t('Logout'), 'auth', 'logout') ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
</header>
|
||||
|
|
|
|||
|
|
@ -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_USERNAME') or define('HTTP_PROXY_USERNAME', '');
|
||||
defined('HTTP_PROXY_PASSWORD') or define('HTTP_PROXY_PASSWORD', '');
|
||||
|
||||
// Disabling logout (for external SSO authentication)
|
||||
defined('DISABLE_LOGOUT') or define('DISABLE_LOGOUT', 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue