X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/175bb0d00678b370bc79fabec3a0334683c3f022..f42c355f4fc6a13d505c56c3cdc63e8ad221f0dd:/app/controllers/api_controller.rb diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 5a112b3cf..23f35a40e 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -170,4 +170,10 @@ class ApiController < ApplicationController raise OSM::APIRateLimitExceeded if new_changes > max_changes end + + def scope_enabled?(scope) + doorkeeper_token&.includes_scope?(scope) + end + + helper_method :scope_enabled? end