mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-16 10:45:12 +00:00
fix(console-v2): settings permission restriction, u2f naming, asset error handling (#3658)
* fix permission on nav * restrict settings access * fido table * u2f i18n, permission * factor, image fallback Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
co-authored by
Livio Amstutz
parent
62c4a4d08d
commit
40d7dba574
@@ -1,5 +1,6 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
|
||||
import { PolicyComponentServiceType } from '../modules/policies/policy-component-types.enum';
|
||||
import { Theme } from '../modules/policies/private-labeling-policy/private-labeling-policy.component';
|
||||
@@ -80,9 +81,7 @@ export class AssetService {
|
||||
}
|
||||
|
||||
private async getServiceUrl(): Promise<string> {
|
||||
const url = await this.http
|
||||
.get('./assets/environment.json')
|
||||
.toPromise()
|
||||
const url = await lastValueFrom(this.http.get('./assets/environment.json'))
|
||||
.then((data: any) => {
|
||||
if (data && data.api) {
|
||||
return data.api;
|
||||
|
||||
@@ -251,6 +251,19 @@ export class GrpcAuthService {
|
||||
.then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public loadMyUser(): void {
|
||||
from(this.getMyUser())
|
||||
.pipe(
|
||||
map((resp) => resp.user),
|
||||
catchError((_) => {
|
||||
return of(undefined);
|
||||
}),
|
||||
)
|
||||
.subscribe((user) => {
|
||||
this.userSubject.next(user);
|
||||
});
|
||||
}
|
||||
|
||||
public getMyUser(): Promise<GetMyUserResponse.AsObject> {
|
||||
return this.grpcService.auth.getMyUser(new GetMyUserRequest(), null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user