X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7e7ede890e8e948236d3dbc48e24aca00cd01f62..dfc843e7af602350cb240c17b98319f9fa00d08a:/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