Title
#help
m

Maggie Walker

08/31/2022, 3:39 PM
Does the "in" operator work in the playground? I'm trying to write a parallel example to
condition:
  match:
    any:
      of:
        - expr: R.attr.status == "PENDING_APPROVAL"
        - expr: "GB" in R.attr.geographies
        - expr: P.attr.geography == "GB"
like this:
condition:
          match:
              expr: "name" in request.resource.attr
but just getting
Failed to read: failed to convert YAML to JSON: yaml: line 28: did not find expected key
Alex Olivier (Cerbos)

Alex Olivier (Cerbos)

08/31/2022, 3:42 PM
Hey this an annoying YAML/JSON/CEL parsing issue - you can’t start with a
"
If you change your rule to break onto a new line it will work
condition:
              match:
                  expr: >
                    "name" in request.resource.attr
m

Maggie Walker

08/31/2022, 3:43 PM
ooo there we go!