Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

@reactor/auth — permissionsclient

@reactor/auth


@reactor/auth / PermissionsClient

Defined in: permissions.ts:13

Permissions client for checking user permissions.

new PermissionsClient(ctx): PermissionsClient

Defined in: permissions.ts:14

RequestContext

PermissionsClient

check(permissions, options?): Promise<Result<{ allowed: boolean; missing?: string[]; }>>

Defined in: permissions.ts:36

Check if the current user has specific permissions. Returns true if all requested permissions are granted.

string[]

string

Promise<Result<{ allowed: boolean; missing?: string[]; }>>


get(options?): Promise<Result<PermissionsResponse>>

Defined in: permissions.ts:20

Get all permissions for the current user. Optionally scoped to a specific organization.

string

Promise<Result<PermissionsResponse>>


resolveContext(): Promise<Result<{ org?: { id: string; role_id: string; slug: string; }; }>>

Defined in: permissions.ts:54

Resolve the current organization context. Returns the organization determined by the X-Reactor-Org header or default.

Promise<Result<{ org?: { id: string; role_id: string; slug: string; }; }>>