X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7381dad23bcb737d5b08a73027eda9a80c3ef293..4bbd7f531017daf2b72517b1c1e20b523270bdf8:/app/controllers/application_controller.rb?ds=sidebyside 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