Peacemaker.Permission (Peacemaker v3.3.5-rc.7) View Source
The Ecto Repo module for the "permission" table. This is meant to be a join table between Accounts and Permissibles, and the lower level module for adding & removing permissions.
Link to this section Summary
Functions
Creates an association between an account and a permissible, ie: adding a permission.
Deletes the assocation between an account and a permissible, ie: remove a permission.
Finds a single permission given an account_id and a permissible_id
Looks through the given Account's permissbiles for the given permissible type.
Link to this section Types
Specs
Link to this section Functions
Specs
create(Peacemaker.Account.t(), Peacemaker.Permissible.t()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
create(Peacemaker.Account.t(), Peacemaker.Permissible.t()) :: {:ok | :error, Peacemaker.Permissible.t() | String.t()}
Creates an association between an account and a permissible, ie: adding a permission.
Deletes the assocation between an account and a permissible, ie: remove a permission.
Specs
Finds a single permission given an account_id and a permissible_id
Specs
Looks through the given Account's permissbiles for the given permissible type.
For a list of valid permissible types, see Permissibles.list_permissibles/1