summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Controller/Auth.php9
-rw-r--r--app/Template/header.php12
-rw-r--r--app/constants.php3
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);