Skip to content

ResolveFieldPermissionsProps

Defined in: packages/core/src/access/resolveFieldPermissions.ts:131

Props for resolveFieldPermissions.

TData = unknown

optional access?: VexAccessConfig<Record<string, SubjectEntry>, readonly AccessResource[], string, string | undefined, Partial<Record<string, CustomActionsInput>>>

Defined in: packages/core/src/access/resolveFieldPermissions.ts:133

Resolved config from defineAccess(). undefined disables restriction.


action: string

Defined in: packages/core/src/access/resolveFieldPermissions.ts:141

Action on resource.


optional data?: TData

Defined in: packages/core/src/access/resolveFieldPermissions.ts:147

The document the filter callback receives. Pass it whenever available: a map’s per-field booleans are usually expressions over it, and a callback that reads data without it resolves per scope instead.


optional organization?: Record<string, unknown>

Defined in: packages/core/src/access/resolveFieldPermissions.ts:137

Organization document; only meaningful when access.orgCollectionSlug is set.


resource: string

Defined in: packages/core/src/access/resolveFieldPermissions.ts:139

Subject name — a resource slug.


optional scope?: PermissionScope

Defined in: packages/core/src/access/resolveFieldPermissions.ts:156

How to answer when a filter callback needs the document and data was not supplied. Defaults to PERMISSION_SCOPES.all, matching hasPermission.

The list views pass "any": a column is shown or hidden for the whole table, so “denied for EVERY document” is the right question, and all would hide columns whose denial is only per document.


user: Record<string, unknown> | null

Defined in: packages/core/src/access/resolveFieldPermissions.ts:135

The authenticated user document. Roles resolve exactly as in hasPermission.