]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Externalize message about missing OAuth capabilities/permissions and make it less...
[rails.git] / app / controllers / application_controller.rb
index 8eb5f240906579f6fdb21fff01a293fc8c0483ea..15d7781d8d1a6514e316fa6edcf63afb4b7c73e0 100644 (file)
@@ -61,7 +61,8 @@ class ApplicationController < ActionController::Base
     # method, otherwise an OAuth token was used, which has to be checked.
     unless current_token.nil?
       unless current_token.read_attribute(cap)
-        report_error "OAuth token doesn't have that capability.", :forbidden
+        set_locale
+        report_error t("oauth.permissions.missing"), :forbidden
         false
       end
     end