Skip to content

Commit

Permalink
support (eq-)lower in conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
srenatus committed Dec 20, 2024
1 parent 28a6fea commit 1ef2d06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/policies/convert.rego
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ op(e) := r if {
}

is_valid(o) := u if {
o in {"eq", "lt", "gt", "neq"}
o in {"eq", "lt", "gt", "neq", "lower"}
u := _replace(o)
}

_replace("neq") := "ne"

_replace(x) := x if x != "neq"
_replace("lower") := "eq-lower"

_replace(x) := x if not x in {"neq", "lower"}

field(e) := f if {
# find the operand with 'input.*'
Expand Down

0 comments on commit 1ef2d06

Please sign in to comment.