[PS-968] regression bug fix on custom timeout switch for the browser (#2969)

* regression bug fix on custom timeout switch for the browser

* regression bug fix on custom timeout switch for the browser

* locale key fix

* suggestion fixes
This commit is contained in:
Gbubemi Smith 2022-06-24 23:19:55 +01:00 committed by GitHub
parent af8f83980f
commit 37e46dab48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 5 deletions

View File

@ -1846,7 +1846,7 @@
}
}
},
"vaultTimeoutToLarge": {
"vaultTimeoutTooLarge": {
"message": "Your vault timeout exceeds the restrictions set by your organization."
},
"vaultExportDisabled": {

View File

@ -135,8 +135,14 @@ export class SettingsComponent implements OnInit {
}
}
if (!this.vaultTimeout.valid) {
this.platformUtilsService.showToast("error", null, this.i18nService.t("vaultTimeoutToLarge"));
// The minTimeoutError does not apply to browser because it supports Immediately
// So only check for the policyError
if (this.vaultTimeout.hasError("policyError")) {
this.platformUtilsService.showToast(
"error",
null,
this.i18nService.t("vaultTimeoutTooLarge")
);
return;
}
@ -171,8 +177,12 @@ export class SettingsComponent implements OnInit {
}
}
if (!this.vaultTimeout.valid) {
this.platformUtilsService.showToast("error", null, this.i18nService.t("vaultTimeoutToLarge"));
if (this.vaultTimeout.hasError("policyError")) {
this.platformUtilsService.showToast(
"error",
null,
this.i18nService.t("vaultTimeoutTooLarge")
);
return;
}