# yaml-language-server: $schema=https://api.cerbos.dev/latest/cerbos/policy/v1/Policy.schema.json
---
apiVersion: api.cerbos.dev/v1
resourcePolicy:
  version: default
  resource: digital_audio
  schemas:
    principalSchema:
      ref: cerbos:///principal.json
    resourceSchema:
      ref: cerbos:///tenant_owned_resource.json
  importDerivedRoles:
    - content_roles
    - workstation_roles
  variables:
    import:
    - account_feature_controls
  rules:
  - name: review
    actions: ["view", "review"]
    derivedRoles:
      - content_can_review_digital_audio
    effect: EFFECT_ALLOW
  - name: bulk_create
    actions: ["bulk_create"]
    derivedRoles:
      - content_ccm_digital_audio_can_bulk_create
    effect: EFFECT_ALLOW
  - name: client_bulk_create
    actions: ["bulk_create"]
    derivedRoles:
      - workstation_catalog
      - workstation_admin
    condition:
      match:
        expr: V.has_bulk_uploader_tool_2025
    effect: EFFECT_ALLOW
