mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-26 14:28:46 +00:00
fix(console): policy reset for custom, header org filter, idp add dialog (#865)
* remove reset button if not default, rem load * dirty focus fix * use idptype in dialog * remove logs * lint * revert idp add changes * log error * lint
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
<app-detail-layout [backRouterLink]="[ serviceType === PolicyComponentServiceType.ADMIN ? '/iam' : '/org']"
|
||||
[title]="'ORG.POLICY.PWD_AGE.TITLE' | translate" [description]="'ORG.POLICY.PWD_AGE.DESCRIPTION' | translate">
|
||||
<ng-template appHasRole [appHasRole]="['policy.delete']">
|
||||
<button *ngIf="serviceType === PolicyComponentServiceType.MGMT" matTooltip="{{'ORG.POLICY.RESET' | translate}}"
|
||||
color="warn" (click)="removePolicy()" mat-stroked-button>
|
||||
<button *ngIf="serviceType === PolicyComponentServiceType.MGMT && !isDefault"
|
||||
matTooltip="{{'ORG.POLICY.RESET' | translate}}" color="warn" (click)="removePolicy()" mat-stroked-button>
|
||||
{{'ORG.POLICY.RESET' | translate}}
|
||||
</button>
|
||||
</ng-template>
|
||||
|
||||
+7
-3
@@ -112,7 +112,6 @@ export class PasswordAgePolicyComponent implements OnDestroy {
|
||||
this.ageData.expireWarnDays,
|
||||
).then(() => {
|
||||
this.toast.showInfo('ORG.POLICY.TOAST.SET', true);
|
||||
this.getData();
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
@@ -122,7 +121,6 @@ export class PasswordAgePolicyComponent implements OnDestroy {
|
||||
this.ageData.expireWarnDays,
|
||||
).then(() => {
|
||||
this.toast.showInfo('ORG.POLICY.TOAST.SET', true);
|
||||
this.getData();
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
@@ -134,12 +132,18 @@ export class PasswordAgePolicyComponent implements OnDestroy {
|
||||
this.ageData.expireWarnDays,
|
||||
).then(() => {
|
||||
this.toast.showInfo('ORG.POLICY.TOAST.SET', true);
|
||||
this.getData();
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public get isDefault(): boolean {
|
||||
if (this.ageData && this.serviceType === PolicyComponentServiceType.MGMT) {
|
||||
return (this.ageData as PasswordAgePolicyView.AsObject).pb_default;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user