Fix authorization in many places (use async)

Admin basket: Fix display
This commit is contained in:
phil 2024-03-26 12:06:22 +05:30
parent 339d8f2210
commit 909e250fe9
26 changed files with 121 additions and 229 deletions

View file

@ -134,4 +134,10 @@ export class AuthenticationService {
conf => conf.bsData?.user?.roles?.filter(value => -1 !== roles.indexOf(value.name)).length > 0
))
}
isNotAuthorized(roles: string[]): Observable<boolean> {
return this.isAuthorized(roles).pipe(map(
isAuthorized => !isAuthorized
))
}
}