# yaml-language-server: $schema=https://api.cerbos.dev/latest/cerbos/policy/v1/Policy.schema.json
---
apiVersion: api.cerbos.dev/v1
derivedRoles:
  name: shared_resource_roles
  definitions:
  - name: identity_shared_with
    parentRoles:
    - user
    condition:
      match:
        expr: (P.id in R.attr.shared_with_identities)
