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