View Source Lightning.Policies.Collections (Lightning v2.10.4)

The Bodyguard Policy module for Collections.

Access to collections is controlled by the project the collection belongs to.

The access_collection action is allowed if the user has access to the project, or if a run belongs to the project (via it's workflow).

Summary

Types

@type actions() :: :access_collection

Functions

Link to this function

authorize(atom, user, collection)

View Source
@spec authorize(
  actions(),
  Lightning.Accounts.User.t(),
  Lightning.Collections.Collection.t()
) ::
  :ok | {:error, :unauthorized}

Callback implementation for Bodyguard.Policy.authorize/3.