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