summaryrefslogtreecommitdiff
path: root/app/Middleware
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2019-01-30 20:59:25 -0800
committerFrédéric Guillot <fred@kanboard.net>2019-01-30 20:59:25 -0800
commit61a55c888889a1ec3376a7a3bba230dc15a378a4 (patch)
treea7bd979f04aeed56e7c101e7a6dad6cd52c6404d /app/Middleware
parent19ea9ed6209b36cba5cb8f96224d9e3a0c022c93 (diff)
Check if user role has changed while the session is open
Diffstat (limited to 'app/Middleware')
-rw-r--r--app/Middleware/AuthenticationMiddleware.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Middleware/AuthenticationMiddleware.php b/app/Middleware/AuthenticationMiddleware.php
index 54652e57..7eb9f745 100644
--- a/app/Middleware/AuthenticationMiddleware.php
+++ b/app/Middleware/AuthenticationMiddleware.php
@@ -20,7 +20,8 @@ class AuthenticationMiddleware extends BaseMiddleware
public function execute()
{
if (! $this->authenticationManager->checkCurrentSession()) {
- throw AccessForbiddenException::getInstance()->withoutLayout();
+ $this->response->redirect($this->helper->url->to('AuthController', 'login'));
+ return;
}
if (! $this->isPublicAccess()) {