Lightning.Policies.Users (Lightning v2.14.5-pre1)

View Source

The Bodyguard Policy module for users roles.

Summary

Types

actions()

@type actions() ::
  :access_admin_space | :edit_credential | :delete_credential | :delete_account

Functions

authorize(action, authenticated_user, account_user)

@spec authorize(actions(), Lightning.Accounts.User.t(), any()) :: boolean()

Callback implementation for Bodyguard.Policy.authorize/3.