mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
block registrations from banned users
This commit is contained in:
parent
957fafe769
commit
007624ed85
1 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue