 defmodule AtomTweaksWeb.PlugHelpers do
   @moduledoc """
-  Plug functions for various uses.
+  [Function plugs](https://hexdocs.pm/plug/readme.html#the-plug-conn-struct) to be used within
+  either a router or controller.
   """
 
   alias AtomTweaksWeb.ForbiddenUserError
   alias AtomTweaksWeb.NotLoggedInError
 
   @doc """
-  A [function plug](https://hexdocs.pm/plug/readme.html#the-plug-conn-struct) used within a
-  router or controller that verifies that there is a currently logged in user.
+  Verifies that there is a currently logged in user.
+
+  Raises `AtomTweaksWeb.NotLoggedInError` when there is no user logged in.
 
   ## Examples
 

  plug :ensure_site_admin when action in [:create]
  ```
  """
  def ensure_site_admin(conn, _) do
    if conn.assigns[:current_user].site_admin do
      conn

  end

  @doc """
  Verifies that the currently logged in user is a site admin.

  Raises `AtomTweaksWeb.ForbiddenUserError` when the current user is not a site admin.

  ## Examples

