[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 {
|
private preValidate(): boolean {
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case PolicyType.RequireSso:
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
// Have SingleOrg policy enabled?
|
// Have SingleOrg policy enabled?
|
||||||
|
@ -186,6 +187,19 @@ export class PolicyEditComponent implements OnInit {
|
||||||
}
|
}
|
||||||
return true;
|
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:
|
default:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3394,5 +3394,8 @@
|
||||||
},
|
},
|
||||||
"estimatedTax": {
|
"estimatedTax": {
|
||||||
"message": "Estimated tax"
|
"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