From a99fec17db2d14f9d895f25f702d3912151bf7a2 Mon Sep 17 00:00:00 2001 From: Loris Sauter Date: Wed, 4 Oct 2023 17:11:14 +0200 Subject: [PATCH] Resolved #433 Forbidden access redirects to login page --- frontend/src/app/services/session/authentication.sevice.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/services/session/authentication.sevice.ts b/frontend/src/app/services/session/authentication.sevice.ts index bdc35e76..f6db0a46 100644 --- a/frontend/src/app/services/session/authentication.sevice.ts +++ b/frontend/src/app/services/session/authentication.sevice.ts @@ -110,7 +110,8 @@ export class AuthenticationService { if (!role) { return this.router.parseUrl(`/login?returnUrl=${state.url}`) } else if (route.data.roles && route.data.roles.indexOf(role) === -1) { - return this.router.parseUrl('/forbidden'); + //return this.router.parseUrl('/forbidden'); + return this.router.parseUrl(`/login?returnUrl=${state.url}`) } else { return true; }