decorators
drunc.authoriser.decorators
Functions:
authentified_and_authorised(action, system)
Decorator to check if the user is authentified and authorised to execute a command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
ActionType
|
The action type to check. |
required |
system
|
SystemType
|
The system type to check. |
required |
Returns:
| Type | Description |
|---|---|
Callable[[C], C]
|
A decorator that checks if the user is authentified and authorised. |
Raises:
| Type | Description |
|---|---|
Unauthorised
|
If the user is not authorised to execute the command. |