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:
Max Peintner
2022-05-20 11:23:16 +02:00
committed by GitHub
co-authored by Livio Amstutz
parent 62c4a4d08d
commit 40d7dba574
41 changed files with 633 additions and 222 deletions
@@ -37,7 +37,6 @@ import { MessageCustomText } from 'src/app/proto/generated/zitadel/text_pb';
import { AdminService } from 'src/app/services/admin.service';
import { GrpcAuthService } from 'src/app/services/grpc-auth.service';
import { ManagementService } from 'src/app/services/mgmt.service';
import { StorageService } from 'src/app/services/storage.service';
import { ToastService } from 'src/app/services/toast.service';
import { InfoSectionType } from '../../info-section/info-section.component';
@@ -275,6 +274,7 @@ const REQUESTMAP = {
styleUrls: ['./message-texts.component.scss'],
})
export class MessageTextsComponent implements OnInit, OnDestroy {
public loading: boolean = false;
public getDefaultInitMessageTextMap$: Observable<{ [key: string]: string }> = of({});
public getCustomInitMessageTextMap$: BehaviorSubject<{ [key: string]: string | boolean }> = new BehaviorSubject({}); // boolean because of isDefault
@@ -400,7 +400,6 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
private toast: ToastService,
private injector: Injector,
private dialog: MatDialog,
private storageService: StorageService,
) {}
ngOnInit(): void {
@@ -493,11 +492,14 @@ export class MessageTextsComponent implements OnInit, OnDestroy {
}
const reqCustomInit = REQUESTMAP[this.serviceType][type].get.setLanguage(this.locale);
this.loading = true;
return this.getCurrentValues(type, reqCustomInit)
?.then((data) => {
this.loading = false;
this.getCustomInitMessageTextMap$.next(data);
})
.catch((error) => {
this.loading = false;
this.toast.showError(error);
});
}