Check permissions
Endpoint to check if a user has permissions to act on resources.
Args: user_id: ID of the user for which to check the permissions. action: The action the user wants to perform on the resources. resources: The resources the user wants to perform the action on. auth_context: The authentication context. rbac: RBAC component. db: DB session.
Raises: IllegalOperationError: If the user is not an internal user.
Returns: A dictionary mapping resources to a boolean which indicates whether the user has permissions to perform the action on that resource.
Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:
OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Query parameters
user_idstring · uuidRequired
actionstringRequired
resourcesstring[]Optional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
/rbac/check_permissionsGET /rbac/check_permissions?user_id=123e4567-e89b-12d3-a456-426614174000&action=text HTTP/1.1
Host:
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": true
}Last updated
Was this helpful?