Lightning.Policies.Credentials (Lightning v2.14.5-pre1)
View SourceThe Bodyguard Policy module for authorizing credential actions.
Summary
Functions
Authorize credential actions based on the user's project role.
Types
Functions
@spec authorize( action :: actions(), project_user :: Lightning.Projects.ProjectUser.t(), resource :: any() ) :: boolean()
@spec authorize( action :: actions(), user_or_project_user :: Lightning.Accounts.User.t() | Lightning.Projects.ProjectUser.t(), resource :: Lightning.Credentials.KeychainCredential.t() ) :: boolean()
Authorize credential actions based on the user's project role.
For KeychainCredential resources, users must have owner or admin role in the associated project.