Overview
useFetchWorkspaceAuthority returns a callable that resolves the signed-in user’s standing on a workspace: { reasons, capabilities, permissions, rank }. Use it to drive UI (show/hide buttons) — a permission check is a one-line .includes() on the result. Sublay never consumes your opaque permissions.
Visibility-gated, like every workspace read. A signed-in user with no relation to the workspace gets
404 workspace/not-found from GET /workspaces/:workspaceId/authority/me, exactly as for a workspace that doesn’t exist, so the route never confirms that a workspace exists. For a UI gate, treat that 404 as “no standing here”.Usage Example
Parameters
Returns
WorkspaceAuthority:
WorkspaceAuthorityReasonDetail:
view is implied by every other capability. Any user with standing resolves with view in capabilities, including a member whose stored capabilities array is empty. A user with no relation at all gets the 404 instead of a record — so a returned record always includes view.capabilities / permissions / rank are never fenced here — the fence exists to stop a caller reconstructing someone else’s rank, and there is nobody else in this payload.

