Skip to content

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.

const descriptor: PermissionDescriptor = {
action: "update",
table: posts,
};

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.