B Cerkezi
08/16/2022, 4:45 PM---
apiVersion: api.cerbos.dev/v1
resourcePolicy:
resource: album
version: default
rules:
- actions: ['view']
effect: EFFECT_ALLOW
roles:
- editor
condition:
match:
expr: 'test' in request.principal.attr.products
and response
failed to convert YAML to JSON: yaml: line 12: did not find expected key
Alex Olivier (Cerbos)
08/16/2022, 4:50 PM'
at the start of an expression - you can break out onto a new line as follows which works
---
apiVersion: api.cerbos.dev/v1
resourcePolicy:
resource: album
version: default
rules:
- actions: ['view']
effect: EFFECT_ALLOW
roles:
- editor
condition:
match:
expr: >
'test' in request.principal.attr.products
B Cerkezi
08/16/2022, 4:52 PM