Actions
Bug #5982
closedIn API/rules include/exclude is ordered for target parameter
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
In the rule API (update, creation), include and exclude are ordered for the target parameter, so that:
"targets": [ { "exclude": {"or": ["policyServer:root"] }, "include": {"or": ["group:foo"]} }]
Leads to error:
"errorDetails": "Could not create Rule 60214a59-8d07-4446-9db1-36feb5342f3f cause is: JObject(List(JField(exclude,JObject(List(JField(or,JArray(List(JString(policyServer:root))))))), JField(include,JObject(List(JField(or,JArray(List(JString(group:foo))))))))) is not a valid rule target."
But:
"targets": [ { "include": {"or": ["group:foo"]}, "exclude": {"or": ["policyServer:root"] } }]
Works fine. But JSON fields are not sorted.
Actions