calcinator v1.0.0 Calcinator.Authorization behaviour
Behaviour for Calcinator.Resources.t authorization_module
Summary
Types
The actions that must be handled by can?/3, filter_associations_can/3, and filter_can/3
The subject that is trying to do the action and needs to be authorized by authorization_module
The target of the subject’s action
Callbacks
Checks whether subject (from Calcinator.Resources.t subject) can perform action on target
Reduces associations on target to only those where can?(subject, action, associated_ascent) is true
Reduces targets to only those elements where can?(subject, action, targets_element) is true
Types
The actions that must be handled by can?/3, filter_associations_can/3, and filter_can/3.
The subject that is trying to do the action and needs to be authorized by authorization_module
Callbacks
Checks whether subject (from Calcinator.Resources.t subject) can perform action on target.