View Source Bonfire.Boundaries.Grants (bonfire_umbrella v0.9.8-cooperation-beta.15)

A grant is part of an Acl, and defines a permission (value boolean on a verb) for a subject

Summary

Functions

Link to this function

changeset(grant \\ %Grant{}, attrs)

View Source
Link to this function

changeset(atom, attrs, opts)

View Source
Link to this function

grant(subject_id, acl_id, verb, value, opts \\ [])

View Source

Edits or adds a grant to an Acl

Takes three parameters:

  • subject_id: who we are granting access to
  • acl_id: what ACL we're applying a grant to
  • verb: which verb/action
  • value: true, false, or nil
Link to this function

grant_role(subject_id, acl_id, role, opts \\ [])

View Source

Edits or adds grants to an Acl based on a role

Link to this function

grants_to_tuples(creator, grants)

View Source

Lists the grants permitted to see.

Lists the grants we are the registered caretakers of that we are permitted to see. If any are created without permitting the user to see them, they will not be shown.

Link to this function

remove_subject_from_acl(subject, acls)

View Source
Link to this function

subject_verb_grants(grants)

View Source
Link to this function

upsert_or_delete(attrs, opts)

View Source
Link to this function

verb_subject_grant(grants)

View Source