[Policy] Single Org dependency chain (#739)

* Initial commit of Single Org downstream policy checks

* Moved comments
This commit is contained in:
Vincent Salucci 2020-12-17 14:20:45 -06:00 committed by GitHub
parent c487cf3284
commit 7b43dcb6a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -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;
}

View File

@ -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."
}
}