X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2c13981b0fa6d7b6ddfc4277c53eb9c515dd2736..09c5740b5bb94c75a5c8c83cdbb80ae7b5ccbdf4:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c43271b93..012ba2446 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -78,6 +78,12 @@ class ApplicationController < ActionController::Base @user = User.authenticate(:username => username, :password => passwd) # basic auth end end + + # check if the user has been banned + unless @user.nil? or @user.blocks.empty? + # NOTE: need slightly more helpful message than this. + render :text => "You got banned!", :status => :forbidden + end end def authorize(realm='Web Password', errormessage="Couldn't authenticate you")