]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/5543'
authorTom Hughes <tom@compton.nu>
Fri, 24 Jan 2025 15:00:25 +0000 (15:00 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 24 Jan 2025 15:00:25 +0000 (15:00 +0000)
app/controllers/api_controller.rb
app/controllers/application_controller.rb

index 5a112b3cf61c4e4e35605b16086cf7bef6a6cc3e..23f35a40eeaf73662765d1d8cf137f2605f40f9c 100644 (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
index 9949149aa66a7823ad768a288c8a48972d228f63..176fd8c2e060213d8264c1ccd1dd8cddca281df6 100644 (file)
@@ -351,10 +351,4 @@ class ApplicationController < ActionController::Base
 
     referer&.to_s
   end
-
-  def scope_enabled?(scope)
-    doorkeeper_token&.includes_scope?(scope)
-  end
-
-  helper_method :scope_enabled?
 end