rules:
  # Vendor image for all roles.
  - path: /assets/image/vendor/<int>/asset/<*>
    methods: [GET]
    groups:
      alw: [1, 2, 3, 5, 6]
      oa: ['*']
  # Product cover image for all as it is homepage component.
  - path: /assets/image/product/cover/<int>/location
    methods: [GET]
    groups:
      alw: [1, 2, 3, 5, 6]
      oa: ['*']
  - path: /assets/image/product/cover/location
    methods: [GET]
    groups:
      alw: [1, 2, 3, 5, 6]
      oa: ['*']

  # Catalog: Product large cover, all product asset,
  - path: /assets/image/product/large_cover/<int>/location
    methods: [GET]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/image/product/cover_correction/<int>/location
    methods: [GET]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/image/product/large_cover_correction/<int>/location
    methods: [GET]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/image/product/cover_large/<int>/location
    methods: [GET]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/asset/product/<int>
    methods: [GET, PATCH]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/v2/asset/product/<int>
    methods: [GET, PATCH]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/upload-token
    methods: [GET, POST]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/asset
    methods: [POST]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/v2/assets/upload
    methods: [POST]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/v2/assets/upload/<*>
    methods: [GET, PATCH]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/v2/asset/status/<*>
    methods: [GET]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/asset/status
    methods: [GET]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/stream/track/<int>/hls
    methods: [GET]
    groups:
      alw: [1]
      oa: ['*']
  - path: /assets/stream/track/<int>/hls/clear-cache
    methods: [POST]
    groups:
      alw: [1]
      oa: ['*']

  # Admin: Allow all.
  - path: <*>
    methods: ['*']
    groups:
      alw: [4]
      oa: ['*']
