X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/017f7da76f3d59a71c3cca481e0d3a20afe1c046..83167c368ec419789fa2e579de1af98e29abc30f:/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