]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Rework the user details screen to be less crap... Highlights include:
[rails.git] / app / controllers / application_controller.rb
index dc17a21628b91885d46729fd27fd85d6bdb854e7..0c41170470c3d9b1054be5cb8e4c61a55e3a3b77 100644 (file)
@@ -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