mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-01 00:37:24 +00:00
fix(console): restore url after state handling, remove user metadata without user.write permission (#4136)
* metadata role check * fix: restore url after handling state * hide metadata if has user not user.write * allow metadata read Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
parent
d4d39dbd80
commit
075fd1dfe6
@ -1,7 +1,15 @@
|
|||||||
<cnsl-card class="metadata-details" title="{{ 'USER.METADATA.TITLE' | translate }}">
|
<cnsl-card class="metadata-details" title="{{ 'USER.METADATA.TITLE' | translate }}">
|
||||||
<div class="metadata-actions">
|
<div class="metadata-actions">
|
||||||
<mat-spinner class="spinner" diameter="20" *ngIf="loading"></mat-spinner>
|
<mat-spinner class="spinner" diameter="20" *ngIf="loading"></mat-spinner>
|
||||||
<button mat-raised-button color="primary" class="edit" (click)="editMetadata()">{{ 'ACTIONS.EDIT' | translate }}</button>
|
<button
|
||||||
|
[disabled]="(['user.write:' + userId, 'user.write'] | hasRole | async) === false"
|
||||||
|
mat-raised-button
|
||||||
|
color="primary"
|
||||||
|
class="edit"
|
||||||
|
(click)="editMetadata()"
|
||||||
|
>
|
||||||
|
{{ 'ACTIONS.EDIT' | translate }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-container *ngIf="metadata?.length; else emptyList">
|
<ng-container *ngIf="metadata?.length; else emptyList">
|
||||||
|
@ -28,8 +28,7 @@ export class StatehandlerProcessorServiceImpl implements StatehandlerProcessorSe
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
sessionStorage.removeItem(state);
|
sessionStorage.removeItem(state);
|
||||||
// window.location.replace(window.location.origin + url);
|
this.router.navigateByUrl(url);
|
||||||
this.router.navigate([url]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user