mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 11:42:07 +00:00
Add user accounts, roles, and admin gating
- Scaffold password auth (email or username) with phx.gen.auth; no magic links - Add role (member/moderator/admin/super_admin) and plan (free/premium) enums - Gate /admin behind admin-or-above via plug + on_mount; hide the nav link - Add mix accounts.promote for CLI role changes - Disable email confirmation by confirming accounts at registration Closes #3
This commit is contained in:
@@ -10,6 +10,7 @@ defmodule Chesstrainer.MixProject do
|
||||
start_permanent: Mix.env() == :prod,
|
||||
aliases: aliases(),
|
||||
deps: deps(),
|
||||
dialyzer: [plt_add_apps: [:mix]],
|
||||
compilers: [:phoenix_live_view] ++ Mix.compilers(),
|
||||
listeners: [Phoenix.CodeReloader]
|
||||
]
|
||||
@@ -40,6 +41,7 @@ defmodule Chesstrainer.MixProject do
|
||||
# Type `mix help deps` for examples and options.
|
||||
defp deps do
|
||||
[
|
||||
{:bcrypt_elixir, "~> 3.0"},
|
||||
{:phoenix, "~> 1.8.8"},
|
||||
{:phoenix_ecto, "~> 4.5"},
|
||||
{:ecto_sql, "~> 3.13"},
|
||||
|
||||
Reference in New Issue
Block a user