mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-18 11:15:12 +00:00
fix(console, e2e): optimize console and activate tests (#4207)
* activate some tests * unskip remove project tests * focus input elements before typing * fix: prune permissions observable * cleanup * remove timeout * remove ngIf * test with chrome * with ngIf * single observable * juhu * maybe better * fix isAllowed response * cleanup Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
co-authored by
Max Peintner
parent
adb5394ae3
commit
f0250a3fdb
@@ -12,8 +12,6 @@ export class RoleGuard implements CanActivate {
|
||||
constructor(private authService: GrpcAuthService) {}
|
||||
|
||||
public canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
|
||||
return this.authService.fetchedZitadelPermissions
|
||||
.pipe(filter((permissionsFetched) => !!permissionsFetched))
|
||||
.pipe(switchMap((_) => this.authService.isAllowed(route.data['roles'], route.data['requiresAll'])));
|
||||
return this.authService.isAllowed(route.data['roles'], route.data['requiresAll']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user