Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>
accounts: disallow sign up if email is on the blocked domains list
app/controllers/public/account_controller.rb | 6 ++++++
diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb index d7fe511ae04e24de2bbf551ed816d75dfd3a4b7a..8d18ec0b717d8f8afa6da359f1aa6ba6964c1d9a 100644 --- a/app/controllers/public/account_controller.rb +++ b/app/controllers/public/account_controller.rb @@ -110,6 +110,12 @@ @person.environment = @user.environment @kinds = environment.kinds.where(:type => 'Person') if request.post? + if email_domain_blocklist.include?(@user.email.split("@").last) + session[:notice] = _('Email domain is on the block list!') + render action: 'signup', status: :unprocessable_entity + return + end + if may_be_a_bot set_signup_start_time_for_now @block_bot = true