Externalize message about missing OAuth capabilities/permissions and make it less technical

This commit is contained in:
Simon Poole 2017-02-26 21:43:43 +01:00
parent 8db0548119
commit 12013f60a0
2 changed files with 4 additions and 1 deletions

View 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