---
title: canEach
description: >-
  `can` for each of `targets`, in order, in the D1 calls one check makes: for a
  list that asks about many pages at once, such as a queue of comments on
  different pages.
updated_at: '2026-11-19T13:21:09+01:00'
created_at: '2026-11-19T03:35:41+01:00'
symbol:
  kind: function
  name: canEach
  signatures:
    - >-
      canEach(account: [[reference/api/auth/server/Account|Account]] | null,
      permission: `${string}:${string}:read` | `${string}:${string}:write` |
      `${string}:${string}:delete`, targets: readonly
      [[reference/api/auth/server/PermissionTarget|PermissionTarget]][], env:
      Env$1): Promise<boolean[]>
  parameters:
    - name: account
      type: '[[reference/api/auth/server/Account|Account]] | null'
    - name: permission
      type: >-
        `${string}:${string}:read` | `${string}:${string}:write` |
        `${string}:${string}:delete`
    - name: targets
      type: >-
        readonly
        [[reference/api/auth/server/PermissionTarget|PermissionTarget]][]
    - name: env
      type: Env$1
  returns:
    type: 'Promise<boolean[]>'
  source: >-
    https://github.com/mia-cx/svartz/blob/711f3906a713c8b9a5a572d0f34c85e90c3bc3d1/packages/auth/src/grants.ts#L131
---

# canEach
