X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7381dad23bcb737d5b08a73027eda9a80c3ef293..441b92c3c33cf79c2bac977cf0b3cf2c3e7e010e:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index dc17a2162..0c4117047 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -192,6 +192,8 @@ class ApplicationController < ActionController::Base report_error message, :bad_request rescue OSM::APIError => ex report_error ex.message, ex.status + rescue ActionController::UnknownAction => ex + raise rescue Exception => ex logger.info("API threw unexpected #{ex.class} exception: #{ex.message}") ex.backtrace.each { |l| logger.info(l) } @@ -228,6 +230,8 @@ class ApplicationController < ActionController::Base case when user.nil? then user = :none when user.display_name == controller.params[:display_name] then user = :self + when user.administrator? then user = :administrator + when user.moderator? then user = :moderator else user = :other end