X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6ee672fe9500d854b66121879df8f65cfbbdf499..cd43529cc8d9b8c020117fd5d690a64f2f0464b9:/app/controllers/user_controller.rb diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 8c63f8b75..77370c311 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -38,6 +38,8 @@ class UserController < ApplicationController else render :action => 'terms' end + elsif Acl.match(request.remote_ip, params[:user][:email].split("@").last).where(:k => "no_account_creation").exists? + render :action => 'blocked' else session[:referer] = params[:referer] @@ -79,9 +81,7 @@ class UserController < ApplicationController def save @title = t 'user.new.title' - if Acl.address(request.remote_ip).where(:k => "no_account_creation").exists? - render :action => 'new' - elsif params[:decline] + if params[:decline] if @user @user.terms_seen = true @@ -112,6 +112,8 @@ class UserController < ApplicationController else redirect_to :action => :account, :display_name => @user.display_name end + elsif Acl.match(request.remote_ip, params[:user][:email].split("@").last).where(:k => "no_account_creation").exists? + render :action => 'blocked' else @user = User.new(params[:user]) @@ -269,6 +271,8 @@ class UserController < ApplicationController :openid_url => params[:openid]) flash.now[:notice] = t 'user.new.openid association' + elsif Acl.match(request.remote_ip).where(:k => "no_account_creation").exists? + render :action => 'blocked' end end