Project

General

Profile

Actions

Bug #5982

closed

In API/rules include/exclude is ordered for target parameter

Added by François ARMAND over 9 years ago. Updated about 9 years ago.

Status:
Released
Priority:
1
Category:
API
Target version:
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.


Subtasks 1 (0 open1 closed)

Bug #5988: Error with only "and" target since #5982ReleasedNicolas CHARLES2014-12-11Actions
Actions

Also available in: Atom PDF