mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-28 17:27:50 +01:00
[Policy] Single Org dependency chain (#739)
* Initial commit of Single Org downstream policy checks * Moved comments
This commit is contained in:
parent
c487cf3284
commit
7b43dcb6a1
@ -175,7 +175,8 @@ export class PolicyEditComponent implements OnInit {
|
||||
private preValidate(): boolean {
|
||||
switch (this.type) {
|
||||
case PolicyType.RequireSso:
|
||||
if (!this.enabled) { // Don't need prevalidation checks if submitting to disable
|
||||
// Don't need prevalidation checks if submitting to disable
|
||||
if (!this.enabled) {
|
||||
return true;
|
||||
}
|
||||
// Have SingleOrg policy enabled?
|
||||
@ -186,6 +187,19 @@ export class PolicyEditComponent implements OnInit {
|
||||
}
|
||||
return true;
|
||||
|
||||
case PolicyType.SingleOrg:
|
||||
// Don't need prevalidation checks if submitting to enable
|
||||
if (this.enabled) {
|
||||
return true;
|
||||
}
|
||||
// If RequireSso Policy is enabled prevent submittal
|
||||
if (this.policiesEnabledMap.has(PolicyType.RequireSso)
|
||||
&& this.policiesEnabledMap.get(PolicyType.RequireSso)) {
|
||||
this.toasterService.popAsync('error', null, this.i18nService.t('disableRequireSsoError'));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
@ -3394,5 +3394,8 @@
|
||||
},
|
||||
"estimatedTax": {
|
||||
"message": "Estimated tax"
|
||||
},
|
||||
"disableRequireSsoError": {
|
||||
"message": "You must manually disable the Single Sign-On Authentication policy before this policy can be disabled."
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user