PermissionDescriptor
PermissionDescriptor =
object
Defined in: packages/permissions/src/types.ts:122
Structural description of a permission requirement.
Describes what kind of operation on which table without specifying concrete row values. This is what makes client-side permission introspection possible: you can check whether a role has the right grants without knowing the specific row being accessed.
Example
Section titled “Example”const descriptor: PermissionDescriptor = { action: "update", table: posts,};Properties
Section titled “Properties”action
Section titled “action”action:
PermissionAction
Defined in: packages/permissions/src/types.ts:124
The operation being checked.
table:
DrizzleTable
Defined in: packages/permissions/src/types.ts:126
The Drizzle table the operation targets.