]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Add support for OAuth2 using doorkeeper
[rails.git] / app / controllers / application_controller.rb
index b4c0fbc23feb7a5f1fb5c4f1482f740357fde78c..fc8b75b60144ec40e2bf2a851ae7fcdce8c171da 100644 (file)
@@ -345,7 +345,7 @@ class ApplicationController < ActionController::Base
   end
 
   def deny_access(_exception)
-    if current_token
+    if doorkeeper_token || current_token
       set_locale
       report_error t("oauth.permissions.missing"), :forbidden
     elsif current_user