Authorization.permit
You're seeing just the function
permit
, go back to Authorization module for more information.
Link to this function
permit(module, action, actor, opts \\ [])
Specs
permit(module :: module(), action :: atom(), actor :: term(), opts :: [opt()]) :: :ok | {:error, Authorization.Error.t()}
Authorize an action.
Processes Authorization.Policy.authorize/3
result.
Returns :ok
on success, and {:error, reason}
on failure.
Options
:subject
– any value we want to access to in the authorize/3 callback.:loader
– an initialized Dataloader struct with loaded sources. We use it to process results we preload earlier.