# Only routes reachable through grass sessions are listed here. ows-video's
# service-to-service routes are authorized by the M2M ACLs on the service
# registration and are intentionally not exposed to session users.
rules:
  # Workstation Catalog + Administrator and all OA users: video product
  # management.
  - path: /video/jobs
    methods: [GET]
    groups:
      alw: [1, 4]
      oa: ['*']

  - path: /video/job
    methods: [POST]
    groups:
      alw: [1, 4]
      oa: ['*']

  - path: /video/create_product
    methods: [POST]
    groups:
      alw: [1, 4]
      oa: ['*']

  - path: /video/metadata/<int>
    methods: [GET, POST]
    groups:
      alw: [1, 4]
      oa: ['*']

  - path: /video/product/<int>/submit
    methods: [POST]
    groups:
      alw: [1, 4]
      oa: ['*']

  - path: /video/product/<int>/approval
    methods: [GET]
    groups:
      alw: [1, 4]
      oa: ['*']

  - path: /video/product/<int>/get_available_channels
    methods: [GET]
    groups:
      alw: [1, 4]
      oa: ['*']

  - path: /video/workflow/<*>
    methods: [GET, POST]
    groups:
      alw: [1, 4]
      oa: ['*']

  - path: /video/thumbnails/job/<int>
    methods: [GET]
    groups:
      alw: [1, 4]
      oa: ['*']

  - path: /video/stream/product/<int>/hls
    methods: [GET]
    groups:
      alw: [1, 4]
      oa: ['*']

  - path: /video/output_video_outer_resolutions
    methods: [GET]
    groups:
      alw: [1, 4]
      oa: ['*']

  # Workstation Administrator and all OA users: bulk / thumbnail-token / project
  # operations (not exposed to the Catalog role).
  - path: /video/metadata/bulk-ingest
    methods: [POST]
    groups:
      alw: [4]
      oa: ['*']

  - path: /video/thumbnails/upload-token
    methods: [POST]
    groups:
      alw: [4]
      oa: ['*']

  - path: /video/product/<int>/migrate_project
    methods: [POST]
    groups:
      alw: [4]
      oa: ['*']

  # OA users only: approval decisions, Orchard-side video configuration and
  # OA / Switchboard flows.
  - path: /video/product/<int>/approval
    methods: [POST]
    groups:
      oa: ['*']

  - path: /video/project/<int>/get_available_channels
    methods: [POST]
    groups:
      oa: ['*']

  - path: /video/sizing_rules
    methods: [GET]
    groups:
      oa: ['*']

  - path: /video/sizing_rule
    methods: [POST]
    groups:
      oa: ['*']

  - path: /video/sizing_rule/<int>
    methods: [GET, DELETE]
    groups:
      oa: ['*']
