]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'openstreetmap/pull/1467'
authorTom Hughes <tom@compton.nu>
Sun, 26 Feb 2017 22:22:48 +0000 (22:22 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 26 Feb 2017 22:22:48 +0000 (22:22 +0000)
app/controllers/application_controller.rb
config/locales/en.yml

index 10901fdd5f4236cc015ff31b6ab33645b9f8099e..26bb92f9af78b8685f8fa9356428a5b5a269595b 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
index 3afa7e805600df14b8c1937c0dfd504f11afea54..c709726ac7adc432090552cd1f97f5360fffbc36 100644 (file)
@@ -1651,6 +1651,8 @@ en:
       invalid: "The authorization token is not valid."
     revoke:
       flash: "You've revoked the token for %{application}"
+    permissions:
+      missing: "You have not permitted the application access to this facility"
   oauth_clients:
     new:
       title: "Register a new application"