m

    Maggie Walker

    3 weeks ago
    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)

    3 weeks ago
    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

    3 weeks ago
    ooo there we go!