]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Use cancancan to authorize user_preference_controller
[rails.git] / app / controllers / application_controller.rb
index 54d5835bbc5868c87d5f1ffb10a2c4157a0dd651..b6a2467a4149d01bbfebe932d128f0331ed2c393 100644 (file)
@@ -476,8 +476,8 @@ class ApplicationController < ActionController::Base
 
   def deny_access(exception)
     if current_user
-      raise "Access denied on #{exception.action} #{exception.subject.inspect}"
-      # ...
+      set_locale
+      report_error t("oauth.permissions.missing"), :forbidden
     else
       require_user
     end