]> git.openstreetmap.org Git - rails.git/blobdiff - config/routes.rb
Add importer role that can be associated with higher rate limits
[rails.git] / config / routes.rb
index 415f8a01bd9b5dc1b677fe8e3261b51ea709c8f4..43c43a793461242e12541da86ce4531ae43fd7c0 100644 (file)
@@ -5,6 +5,8 @@ OpenStreetMap::Application.routes.draw do
                 :authorized_applications => "oauth2_authorized_applications"
   end
 
+  use_doorkeeper_openid_connect :scope => "oauth2" if Settings.key?(:doorkeeper_signing_key)
+
   # API
   namespace :api do
     get "capabilities" => "capabilities#show" # Deprecated, remove when 0.6 support is removed
@@ -102,6 +104,8 @@ OpenStreetMap::Application.routes.draw do
     post "notes/editPOIexec" => "api/notes#comment"
     get "notes/getGPX" => "api/notes#index", :format => "gpx"
     get "notes/getRSSfeed" => "api/notes#feed", :format => "rss"
+
+    resources :user_blocks, :only => [:show], :constraints => { :id => /\d+/ }, :controller => "api/user_blocks", :as => :api_user_blocks
   end
 
   # Data browsing