]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api_controller.rb
Merge remote-tracking branch 'upstream/pull/5461'
[rails.git] / app / controllers / api_controller.rb
index 17c98fe8b657e4c52acf6133084a786110405d90..5a112b3cf61c4e4e35605b16086cf7bef6a6cc3e 100644 (file)
@@ -65,9 +65,9 @@ class ApiController < ApplicationController
   def current_ability
     # Use capabilities from the oauth token if it exists and is a valid access token
     if doorkeeper_token&.accessible?
-      ApiAbility.new(nil).merge(ApiCapability.new(doorkeeper_token))
+      ApiAbility.new(doorkeeper_token)
     else
-      ApiAbility.new(current_user)
+      ApiAbility.new(nil)
     end
   end