RED-5092: Redirect users with any role to main screen.
This commit is contained in:
parent
85e9a93998
commit
ed67dcbbdb
@ -28,7 +28,12 @@ export class IqserAuthGuard extends KeycloakAuthGuard {
|
||||
return false;
|
||||
}
|
||||
|
||||
await this._userService.loadCurrentUser();
|
||||
const user = await this._userService.loadCurrentUser();
|
||||
if (user?.hasAnyRole && route.routeConfig?.path === 'auth-error') {
|
||||
await this._router.navigate(['/main'])
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user