feat: reserve registration only for admins
Some checks are pending
Checks / check (push) Waiting to run

This commit is contained in:
Vladimir Rubin 2024-11-27 21:44:00 +02:00
parent e76f65409f
commit 04575bc283
Signed by: vavakado
GPG key ID: CAB744727F36B524

View file

@ -52,7 +52,7 @@ defmodule ExmrWeb.Router do
live_session :redirect_if_user_is_authenticated, live_session :redirect_if_user_is_authenticated,
on_mount: [{ExmrWeb.UserAuth, :redirect_if_user_is_authenticated}] do on_mount: [{ExmrWeb.UserAuth, :redirect_if_user_is_authenticated}] do
live "/users/register", UserRegistrationLive, :new # live "/users/register", UserRegistrationLive, :new
live "/users/log_in", UserLoginLive, :new live "/users/log_in", UserLoginLive, :new
live "/users/reset_password", UserForgotPasswordLive, :new live "/users/reset_password", UserForgotPasswordLive, :new
live "/users/reset_password/:token", UserResetPasswordLive, :edit live "/users/reset_password/:token", UserResetPasswordLive, :edit
@ -66,6 +66,7 @@ defmodule ExmrWeb.Router do
live_session :require_authenticated_user, live_session :require_authenticated_user,
on_mount: [{ExmrWeb.UserAuth, :ensure_authenticated}] do on_mount: [{ExmrWeb.UserAuth, :ensure_authenticated}] do
live "/users/register", UserRegistrationLive, :new
live "/users/settings", UserSettingsLive, :edit live "/users/settings", UserSettingsLive, :edit
live "/users/settings/confirm_email/:token", UserSettingsLive, :confirm_email live "/users/settings/confirm_email/:token", UserSettingsLive, :confirm_email