From 04575bc28356f54e70500f52dc051a4bf1379d9a Mon Sep 17 00:00:00 2001 From: Vladimir Rubin Date: Wed, 27 Nov 2024 21:44:00 +0200 Subject: [PATCH] feat: reserve registration only for admins --- lib/exmr_web/router.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/exmr_web/router.ex b/lib/exmr_web/router.ex index d8d75d9..4912a08 100644 --- a/lib/exmr_web/router.ex +++ b/lib/exmr_web/router.ex @@ -52,7 +52,7 @@ defmodule ExmrWeb.Router do live_session :redirect_if_user_is_authenticated, 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/reset_password", UserForgotPasswordLive, :new live "/users/reset_password/:token", UserResetPasswordLive, :edit @@ -66,6 +66,7 @@ defmodule ExmrWeb.Router do live_session :require_authenticated_user, on_mount: [{ExmrWeb.UserAuth, :ensure_authenticated}] do + live "/users/register", UserRegistrationLive, :new live "/users/settings", UserSettingsLive, :edit live "/users/settings/confirm_email/:token", UserSettingsLive, :confirm_email