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