diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-02-13 10:49:22 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-02-13 10:49:22 -0500 |
commit | 1e3429b54b7a49c03c29ad6486b02830b96c9324 (patch) | |
tree | 58f1d7a3b9e8800168a01deedd79953b82a5c3e1 /app | |
parent | 3446d2a4c291e16c4d5f099fafb516ae391941f5 (diff) | |
parent | 773bf36733cd217f257f3a5734a6e69353911a01 (diff) |
Merge pull-request #1835
Diffstat (limited to 'app')
-rw-r--r-- | app/Controller/Auth.php | 9 | ||||
-rw-r--r-- | app/Template/header.php | 12 | ||||
-rw-r--r-- | app/constants.php | 3 |
3 files changed, 17 insertions, 7 deletions
diff --git a/app/Controller/Auth.php b/app/Controller/Auth.php index fef7f0e3..b98dff5d 100644 --- a/app/Controller/Auth.php +++ b/app/Controller/Auth.php @@ -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')); + } } /** diff --git a/app/Template/header.php b/app/Template/header.php index fd9ff24d..72d89b80 100644 --- a/app/Template/header.php +++ b/app/Template/header.php @@ -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>
\ No newline at end of file +</header> diff --git a/app/constants.php b/app/constants.php index 1740494e..955edeb5 100644 --- a/app/constants.php +++ b/app/constants.php @@ -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); |