View Source Backstage.Interface.Authorization protocol (backstage v0.0.2)
A mechanism for controlling access to some or all commands in an application.
Order of Operations
Authorization checks should be performed before dispatching commands.
- An actor submits a form or presses a button via a Web or API interface.
- The application confirms the user is allowed to trigger the command.
- If allowed, the command is dispatched upon successful validation.
Authorization Types
This protocol supports a wide variety of access controls. An application may perform checks based on the actor's role, a relation to another entity affected by the command, permissions assigned to the actor, and any logic that can be written into a function.
Authorization Type | Supported? |
---|---|
Global Role-Based Access Control | Yes |
Organization-Level Role-Based Access Control | Yes |
Relationship-Based Access Control | Yes |
Attribute-Based Access Control | Yes |
Summary
Functions
For a given command, perform any necessary checks to provide a response.
Types
Functions
@spec allow?(command :: Backstage.Command.t(), actor :: struct(), opts :: Keyword.t()) :: response()
For a given command, perform any necessary checks to provide a response.