Move scope_enabled? to ApiController

This commit is contained in:
Anton Khorev 2025-01-24 05:56:23 +03:00
parent 8cf77a2f36
commit 47a8907e2a
2 changed files with 6 additions and 6 deletions

View file

@ -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

View file

@ -354,10 +354,4 @@ class ApplicationController < ActionController::Base
referer&.to_s
end
def scope_enabled?(scope)
doorkeeper_token&.includes_scope?(scope)
end
helper_method :scope_enabled?
end