Lightning.Policies.Dataclips (Lightning v2.19.0-pre)

View Source

The Bodyguard Policy module for dataclips actions.

A dataclip belongs to a project, and viewing one is exactly project access — so this delegates rather than re-deciding. The previous implementation built a %Project{} from the dataclip's project_id and asked whether the user was a member of it, which could not see scheduled_deletion and so served bodies from projects that had been shut down.

Summary

Types

actions()

@type actions() :: :view_dataclip

Functions

authorize(atom, user, dataclip)

Callback implementation for Bodyguard.Policy.authorize/3.