Lightning.Policies.Users (Lightning v2.13.3)
View SourceThe Bodyguard Policy module for users roles.
Summary
Functions
authorize/3 takes an action, a user, and a project. It checks the user's role
for this project and returns true
if the user can perform the action and
false if they cannot.
Types
Functions
@spec authorize(actions(), Lightning.Accounts.User.t(), any()) :: boolean()
authorize/3 takes an action, a user, and a project. It checks the user's role
for this project and returns true
if the user can perform the action and
false if they cannot.
Note that permissions are grouped by action.
We deny by default, so if a user's role is not added to the allow roles list for a particular action they are denied.