Add validation to ensure maximum vault timeout is larger than 0 (#1215)
This commit is contained in:
parent
998d36a5d1
commit
4ff38c7148
|
@ -60,6 +60,11 @@ export class MaximumVaultTimeoutPolicyComponent extends BasePolicyComponent {
|
||||||
throw new Error(this.i18nService.t('requireSsoPolicyReqError'));
|
throw new Error(this.i18nService.t('requireSsoPolicyReqError'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const data = this.buildRequestData();
|
||||||
|
if (data?.minutes == null || data?.minutes <= 0) {
|
||||||
|
throw new Error(this.i18nService.t('invalidMaximumVaultTimeout'));
|
||||||
|
}
|
||||||
|
|
||||||
return super.buildRequest(policiesEnabledMap);
|
return super.buildRequest(policiesEnabledMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4290,6 +4290,9 @@
|
||||||
"maximumVaultTimeoutLabel": {
|
"maximumVaultTimeoutLabel": {
|
||||||
"message": "Maximum Vault Timeout"
|
"message": "Maximum Vault Timeout"
|
||||||
},
|
},
|
||||||
|
"invalidMaximumVaultTimeout": {
|
||||||
|
"message": "Invalid Maximum Vault Timeout."
|
||||||
|
},
|
||||||
"hours": {
|
"hours": {
|
||||||
"message": "Hours"
|
"message": "Hours"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue