mirror of
https://github.com/bitwarden/web
synced 2025-12-14 23:33:16 +00:00
Prevent disabling single org when max vault timeout policy is enabled (#1230)
(cherry picked from commit c3a910e785)
This commit is contained in:
@@ -26,9 +26,14 @@ export class SingleOrgPolicyComponent extends BasePolicyComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildRequest(policiesEnabledMap: Map<PolicyType, boolean>): Promise<PolicyRequest> {
|
buildRequest(policiesEnabledMap: Map<PolicyType, boolean>): Promise<PolicyRequest> {
|
||||||
const requireSsoEnabled = policiesEnabledMap.get(PolicyType.RequireSso) ?? false;
|
if (!this.enabled.value) {
|
||||||
if (!this.enabled.value && requireSsoEnabled) {
|
if (policiesEnabledMap.get(PolicyType.RequireSso) ?? false) {
|
||||||
throw new Error(this.i18nService.t('disableRequireSsoError'));
|
throw new Error(this.i18nService.t('disableRequiredError', this.i18nService.t('requireSso')));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (policiesEnabledMap.get(PolicyType.MaximumVaultTimeout) ?? false) {
|
||||||
|
throw new Error(this.i18nService.t('disableRequiredError', this.i18nService.t('maximumVaultTimeoutLabel')));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.buildRequest(policiesEnabledMap);
|
return super.buildRequest(policiesEnabledMap);
|
||||||
|
|||||||
@@ -3853,8 +3853,14 @@
|
|||||||
"manageResetPassword": {
|
"manageResetPassword": {
|
||||||
"message": "Manage Password Reset"
|
"message": "Manage Password Reset"
|
||||||
},
|
},
|
||||||
"disableRequireSsoError": {
|
"disableRequiredError": {
|
||||||
"message": "You must manually disable the Single Sign-On Authentication policy before this policy can be disabled."
|
"message": "You must manually disable the $POLICYNAME$ policy before this policy can be disabled.",
|
||||||
|
"placeholders": {
|
||||||
|
"policyName": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "Single Sign-On Authentication"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"personalOwnershipPolicyInEffect": {
|
"personalOwnershipPolicyInEffect": {
|
||||||
"message": "An organization policy is affecting your ownership options."
|
"message": "An organization policy is affecting your ownership options."
|
||||||
|
|||||||
Reference in New Issue
Block a user