X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/82db7eccc8857081316469d7eb242f422332f097..8b12abd5bb1b96567ab882a3aca0780d0e4af67a:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bc71f275f..a22bc13ed 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -104,6 +104,14 @@ class ApplicationController < ActionController::Base # NOTE: need slightly more helpful message than this. render :text => t('application.setup_user_auth.blocked'), :status => :forbidden end + # if the user hasn't seen the contributor terms then don't + # allow editing - they have to go to the web site and see + # (but can decline) the CTs to continue. + if REQUIRE_TERMS_SEEN + unless @user.nil? or @user.terms_seen + render :text => t('application.setup_user_auth.need_to_see_terms'), :status => :forbidden + end + end end def authorize(realm='Web Password', errormessage="Couldn't authenticate you")