ResolveFieldPermissionsProps
Defined in: packages/core/src/access/resolveFieldPermissions.ts:131
Props for resolveFieldPermissions.
Type Parameters
Section titled “Type Parameters”TData = unknown
Properties
Section titled “Properties”access?
Section titled “access?”
optionalaccess?:VexAccessConfig<Record<string,SubjectEntry>, readonlyAccessResource[],string,string|undefined,Partial<Record<string,CustomActionsInput>>>
Defined in: packages/core/src/access/resolveFieldPermissions.ts:133
Resolved config from defineAccess(). undefined disables restriction.
action
Section titled “action”action:
string
Defined in: packages/core/src/access/resolveFieldPermissions.ts:141
Action on resource.
optionaldata?: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.
organization?
Section titled “organization?”
optionalorganization?:Record<string,unknown>
Defined in: packages/core/src/access/resolveFieldPermissions.ts:137
Organization document; only meaningful when access.orgCollectionSlug is set.
resource
Section titled “resource”resource:
string
Defined in: packages/core/src/access/resolveFieldPermissions.ts:139
Subject name — a resource slug.
scope?
Section titled “scope?”
optionalscope?: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.