Plausible
Plausible
v0.0.1
  • Pages
  • Modules
  • Mix Tasks

    View Source Plausible.Auth (Plausible v0.0.1)

    Summary

    Functions

    create_api_key(user, name, key)
    create_user(name, email, pwd)
    delete_api_key(user, id)
    delete_user(user)
    enterprise_configured?(user)
    find_api_key(raw_key)
    find_user_by(opts)
    has_active_sites?(user, roles \\ [:owner, :admin, :viewer])
    is_super_admin?(user_id)
    user_owns_sites?(user)

    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

    delete_user(user)

    View Source
    Link to this function

    enterprise_configured?(user)

    View Source
    Link to this function

    find_api_key(raw_key)

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

    find_user_by(opts)

    View Source
    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
    Link to this function

    user_owns_sites?(user)

    View Source

    Download ePub version

    Built using ExDoc (v0.30.3) for the Elixir programming language