antimatter.session_mixins.capability_mixin#
Module Contents#
Classes#
Session mixin defining CRUD functionality for capabilities.  | 
- class antimatter.session_mixins.capability_mixin.CapabilityMixin(domain: str, client_func: Callable[[], antimatter.client.DefaultApi], **kwargs)#
 Session mixin defining CRUD functionality for capabilities.
- get_capabilities() List[Dict[str, Any]]#
 Get the capabilities for the session’s domain.
- Returns:
 A list of capabilities.
- get_capability(name: str) Dict[str, Any]#
 Get a specific capability for the session’s domain.
- Parameters:
 name – The name for this capability, like “admin”
- Returns:
 The details of the capability.
- put_capability(name: str, summary: str, description: str | None = None, unary: bool = True, create_only: bool = False) None#
 Create or update a capability. A capability is attached to authenticated domain identities by an identity provider, and confers additional permissions upon the identity. This is done by writing domain policy rules that reference the capability.
- Parameters:
 name – The name for this capability, like “admin”
summary – A short, single sentence description of this capability
description – An optional longer form description of this capability
unary – A unary capability does not have a value
create_only –
If True, an error will be returned if a capability with the name already exists
- delete_capability(name: str) None#
 Delete a capability.
- Parameters:
 name – The name of the capability, like “admin”