X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f1935b1c5786de8f27bee9b6b2da2f28f650468f..ea0f128e9e5d5f42e41adc44e1fa6cd45f608bcb:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0884964ed..517b11e14 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -395,4 +395,10 @@ class ApplicationController < ActionController::Base referer.to_s end + + def scope_enabled?(scope) + doorkeeper_token&.includes_scope?(scope) || current_token&.includes_scope?(scope) + end + + helper_method :scope_enabled? end