From: Tom Hughes Date: Wed, 8 Feb 2012 22:35:13 +0000 (+0000) Subject: Don't check the ACL unless we're creating a new user X-Git-Tag: live~5844 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/8eef66cee2837ce5df84906dbcbf4c5a8df3bea2 Don't check the ACL unless we're creating a new user --- diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 77370c311..1d86c0524 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -38,7 +38,7 @@ 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? + elsif params[:user] and Acl.match(request.remote_ip, params[:user][:email].split("@").last).where(:k => "no_account_creation").exists? render :action => 'blocked' else session[:referer] = params[:referer]