Get the calling user’s role and permissions

View as MarkdownOpen in Claude

Returns the user’s role and the flat list of permissions that role grants in the active organisation. Uses an in-memory Casbin lookup with zero database cost; suitable for show/hide-UI logic on every page load.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Response

The user’s role and permissions.

roleobject or null

Role the user holds in the active organisation, namespace-stripped.

permissionslist of strings
Flat list of permission strings the role grants in the active organisation.