Skip to content

AccessFn

AccessFn<R> = (ctx, record?, input?) => AccessResult | Promise<AccessResult>

Defined in: packages/schema/src/access/types.ts:44

A rule at the resource level. Without a record it decides the operation and may return a row filter; with (ctx, record, input) it is a record-level check. Rules that need the record may throw a TypeError when it is missing, which marks the operation as record-checked.

R = any

AccessContext

R

Partial<R>

AccessResult | Promise<AccessResult>