Externalize message about missing OAuth capabilities/permissions and make it less technical
This commit is contained in:
parent
8db0548119
commit
12013f60a0
2 changed files with 4 additions and 1 deletions
|
@ -61,7 +61,8 @@ class ApplicationController < ActionController::Base
|
||||||
# method, otherwise an OAuth token was used, which has to be checked.
|
# method, otherwise an OAuth token was used, which has to be checked.
|
||||||
unless current_token.nil?
|
unless current_token.nil?
|
||||||
unless current_token.read_attribute(cap)
|
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
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1651,6 +1651,8 @@ en:
|
||||||
invalid: "The authorization token is not valid."
|
invalid: "The authorization token is not valid."
|
||||||
revoke:
|
revoke:
|
||||||
flash: "You've revoked the token for %{application}"
|
flash: "You've revoked the token for %{application}"
|
||||||
|
permissions:
|
||||||
|
missing: "You have not permitted the application access to this facility"
|
||||||
oauth_clients:
|
oauth_clients:
|
||||||
new:
|
new:
|
||||||
title: "Register a new application"
|
title: "Register a new application"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue