From: Tom Hughes Date: Sun, 26 Feb 2017 22:22:48 +0000 (+0000) Subject: Merge remote-tracking branch 'openstreetmap/pull/1467' X-Git-Tag: live~3537 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/428e7d6baa28ecb7d06f1f851fdd69ef00249bfb?hp=40a8e5caf5e5c69d175a90b81528d81d1e4e0964 Merge remote-tracking branch 'openstreetmap/pull/1467' --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 10901fdd5..26bb92f9a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 3afa7e805..c709726ac 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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"