end
def deny_access(_exception)
- if current_user
+ if current_token
set_locale
report_error t("oauth.permissions.missing"), :forbidden
+ elsif current_user
+ set_locale
+ report_error t("application.permission_denied"), :forbidden
+ elsif request.get?
+ redirect_to :controller => "users", :action => "login", :referer => request.fullpath
else
- require_user
+ head :forbidden
end
end
other: "GPX file with %{count} points from %{user}"
description_without_count: "GPX file from %{user}"
application:
+ permission_denied: You do not have permission to access that action
require_cookies:
cookies_needed: "You appear to have cookies disabled - please enable cookies in your browser before continuing."
require_admin: