X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/721f8e00b287974d6346e3c62bb8d0d599cc7db3..127e376bf0a9c42e98af5f9b6251d7a93c5ead69:/app/controllers/api_controller.rb diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 17c98fe8b..5a112b3cf 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -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