X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/92f9d57a4072d11c6995a1291c587a48e6c50362..d6afe1e4d14ad4e642ea3454545740a3294afab7:/app/controllers/site_controller.rb?ds=inline diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 58f0a11c9..13a97a664 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -107,6 +107,14 @@ class SiteController < ApplicationController rescue ActiveRecord::RecordNotFound # don't try and derive a location from a missing/deleted object end + + if api_status != "online" + flash.now[:warning] = { :partial => "layouts/offline_flash" } + elsif current_user && !current_user.data_public? + flash.now[:warning] = { :partial => "not_public_flash" } + else + @enable_editor = true + end end def copyright