View Source Plausible.Auth (Plausible v0.0.1)

Summary

Functions

Link to this function

create_api_key(user, name, key)

View Source
@spec create_api_key(Plausible.Auth.User.t(), String.t(), String.t()) ::
  {:ok, Plausible.Auth.ApiKey.t()} | {:error, Ecto.Changeset.t()}
Link to this function

create_user(name, email, pwd)

View Source
Link to this function

delete_api_key(user, id)

View Source
@spec delete_api_key(Plausible.Auth.User.t(), integer()) :: :ok | {:error, :not_found}
Link to this function

enterprise_configured?(user)

View Source
@spec find_api_key(String.t()) ::
  {:ok, Plausible.Auth.ApiKey.t()} | {:error, :invalid_api_key}
Link to this function

has_active_sites?(user, roles \\ [:owner, :admin, :viewer])

View Source
Link to this function

is_super_admin?(user_id)

View Source