block registrations from banned users

This commit is contained in:
byte[] 2019-12-08 15:45:28 -05:00
parent 957fafe769
commit 007624ed85

View file

@ -44,15 +44,25 @@ defmodule PhilomenaWeb.Router do
plug PhilomenaWeb.TotpPlug
end
pipeline :ensure_not_banned do
plug PhilomenaWeb.FilterBannedUsersPlug
end
pipeline :protected do
plug Pow.Plug.RequireAuthenticated,
error_handler: Pow.Phoenix.PlugErrorHandler
end
scope "/" do
pipe_through [:browser, :ensure_totp, :ensure_not_banned]
pow_registration_routes()
end
scope "/" do
pipe_through [:browser, :ensure_totp]
pow_routes()
pow_session_routes()
pow_extension_routes()
end