Now showing unauthorized page when user is not authorized to access certain links

This commit is contained in:
Erik Tiekstra
2021-09-13 11:59:12 +02:00
parent 8be8fa84af
commit 4895ae3cb9
3 changed files with 3 additions and 1 deletions

View File

@@ -6,6 +6,7 @@
### Bug Fixes
- **authorization:** Now showing unauthorized page when user is not authorized to access certain links. ([TV-531](https://jira.arbetsformedlingen.se/browse/TV-531))
- **my-account:** Hide organization-select when user only is connected to one organization. ([TV-578](https://jira.arbetsformedlingen.se/browse/TV-578))
- **settings:** Fixed issue with feature-toggling. Also implemented spinner when organization is changed. ([TV-573](https://jira.arbetsformedlingen.se/browse/TV-573))
- **employee:** Now reloading employee-card for every visit to avoid cache-problems. ([TV-571](https://jira.arbetsformedlingen.se/browse/TV-571))

View File

@@ -15,7 +15,7 @@ export class RoleGuard implements CanActivate {
const expectedRole: RoleEnum = route.data.expectedRole as RoleEnum;
return this.userService.userRoles$.pipe(
filter(roles => !!roles?.length),
filter(roles => !!roles),
map(roles => {
const userHasRole = roles.some(role => role.type === expectedRole);

View File

@@ -6,6 +6,7 @@
### Bug Fixes
- **authorization:** Now showing unauthorized page when user is not authorized to access certain links. ([TV-531](https://jira.arbetsformedlingen.se/browse/TV-531))
- **my-account:** Hide organization-select when user only is connected to one organization. ([TV-578](https://jira.arbetsformedlingen.se/browse/TV-578))
- **settings:** Fixed issue with feature-toggling. Also implemented spinner when organization is changed. ([TV-573](https://jira.arbetsformedlingen.se/browse/TV-573))
- **employee:** Now reloading employee-card for every visit to avoid cache-problems. ([TV-571](https://jira.arbetsformedlingen.se/browse/TV-571))