View Source Rivet.Ident.Access.Lib (rivet_ident v2.4.0)

Summary

Types

@type ecto_p_result() :: {:ok | :error, Ecto.Changeset.t()}
@type model_p_result() :: {:ok, Rivet.Ident.Access.t()}

Functions

Link to this function

add(user, role, ref_id \\ nil)

View Source
@spec add(Rivet.Ident.User.t() | String.t(), atom(), String.t() | nil) ::
  {:ok, Rivet.Ident.Access.t()} | {:error, String.t()}
Link to this function

delete_by_user(user_id, domain, ref_id)

View Source
Link to this function

drop(user, role_atom, ref_id \\ nil)

View Source
@spec drop(Rivet.Ident.User.t(), atom() | nil, String.t() | nil) ::
  {:ok, Rivet.Ident.Access.t()} | {:error, String.t()}
@spec get_actions(Rivet.Ident.User.t()) :: MapSet.t()

Fold a list of accesses into a set of actions, using memory cache

Link to this function

get_actions(user, domain, ref_id)

View Source
@spec get_actions(Rivet.Ident.User.t(), domain :: atom(), ref_id :: binary()) ::
  MapSet.t()