Skip to content

hailer.permission

MethodHost opReturns
map(option?)permission.mapPromise<PermissionMap>

map(option?)

The current user's permissions, keyed by workspace.

ts
const permissions = await hailer.permission.map();
const scoped = await hailer.permission.map({ workspaceId });

Scoping by app kind:

  • Workspace app — always scoped to the app's workspace. Passing a different workspaceId is rejected with a 403.
  • Private app, no workspaceId — all workspaces.
  • Private app, with workspaceId — that workspace (fetched if not already loaded).

See PermissionMap for the returned shape.

Hailer Developer Documentation