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 <livio.a@gmail.com>
This commit is contained in:
Max Peintner
2022-05-20 11:23:16 +02:00
committed by GitHub
parent 62c4a4d08d
commit 40d7dba574
41 changed files with 633 additions and 222 deletions

View File

@@ -35,6 +35,7 @@
(changedLanguage)="changedLanguage($event)"
(changeUsernameClicked)="changeUsername()"
(submitData)="saveProfile($event)"
(avatarChanged)="refreshUser()"
>
</cnsl-detail-form>
</cnsl-card>

View File

@@ -38,13 +38,13 @@ export class AuthUserDetailComponent implements OnDestroy {
public refreshChanges$: EventEmitter<void> = new EventEmitter();
public settingsList: SidenavSetting[] = [
{ id: 'general', i18nKey: 'USER.SETTINGS.GENERAL'},
{ id: 'idp', i18nKey: 'USER.SETTINGS.IDP'},
{ id: 'passwordless', i18nKey: 'USER.SETTINGS.PASSWORDLESS'},
{ id: 'mfa', i18nKey: 'USER.SETTINGS.MFA'},
{ id: 'grants', i18nKey: 'USER.SETTINGS.USERGRANTS'},
{ id: 'memberships', i18nKey: 'USER.SETTINGS.MEMBERSHIPS'},
{ id: 'metadata', i18nKey: 'USER.SETTINGS.METADATA'},
{ id: 'general', i18nKey: 'USER.SETTINGS.GENERAL' },
{ id: 'idp', i18nKey: 'USER.SETTINGS.IDP' },
{ id: 'passwordless', i18nKey: 'USER.SETTINGS.PASSWORDLESS' },
{ id: 'mfa', i18nKey: 'USER.SETTINGS.MFA' },
{ id: 'grants', i18nKey: 'USER.SETTINGS.USERGRANTS' },
{ id: 'memberships', i18nKey: 'USER.SETTINGS.MEMBERSHIPS' },
{ id: 'metadata', i18nKey: 'USER.SETTINGS.METADATA' },
];
public currentSetting: string | undefined = this.settingsList[0].id;

View File

@@ -22,6 +22,7 @@ export class DetailFormComponent implements OnDestroy, OnChanges {
@Output() public submitData: EventEmitter<Profile.AsObject> = new EventEmitter<Profile.AsObject>();
@Output() public changedLanguage: EventEmitter<string> = new EventEmitter<string>();
@Output() public changeUsernameClicked: EventEmitter<void> = new EventEmitter();
@Output() public avatarChanged: EventEmitter<void> = new EventEmitter();
public profileForm!: FormGroup;
@@ -79,8 +80,9 @@ export class DetailFormComponent implements OnDestroy, OnChanges {
width: '400px',
});
dialogRef.afterClosed().subscribe((resp) => {
if (resp) {
dialogRef.afterClosed().subscribe((shouldReload) => {
if (shouldReload) {
this.avatarChanged.emit();
}
});
}

View File

@@ -53,6 +53,6 @@ export class ProfilePictureComponent {
}
public closeDialog(): void {
this.dialogRef.close(false);
this.dialogRef.close(true);
}
}