Now showing unauthorized page when user is not authorized to access certain links
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
### Bug Fixes
|
### 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))
|
- **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))
|
- **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))
|
- **employee:** Now reloading employee-card for every visit to avoid cache-problems. ([TV-571](https://jira.arbetsformedlingen.se/browse/TV-571))
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export class RoleGuard implements CanActivate {
|
|||||||
const expectedRole: RoleEnum = route.data.expectedRole as RoleEnum;
|
const expectedRole: RoleEnum = route.data.expectedRole as RoleEnum;
|
||||||
|
|
||||||
return this.userService.userRoles$.pipe(
|
return this.userService.userRoles$.pipe(
|
||||||
filter(roles => !!roles?.length),
|
filter(roles => !!roles),
|
||||||
map(roles => {
|
map(roles => {
|
||||||
const userHasRole = roles.some(role => role.type === expectedRole);
|
const userHasRole = roles.some(role => role.type === expectedRole);
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
### Bug Fixes
|
### 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))
|
- **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))
|
- **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))
|
- **employee:** Now reloading employee-card for every visit to avoid cache-problems. ([TV-571](https://jira.arbetsformedlingen.se/browse/TV-571))
|
||||||
|
|||||||
Reference in New Issue
Block a user