OSDN Git Service

Restrict auto generated routes
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Sat, 22 Jun 2013 12:11:23 +0000 (15:11 +0300)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Sat, 22 Jun 2013 12:11:23 +0000 (15:11 +0300)
config/routes.rb

index 1b184fc..3b6a861 100644 (file)
@@ -113,8 +113,8 @@ Gitlab::Application.routes.draw do
       put :update_username
     end
 
-    resource :notifications
-    resource :password
+    resource :notifications, only: [:show, :update]
+    resource :password, only: [:new, :create]
   end
 
   resources :keys
@@ -125,7 +125,7 @@ Gitlab::Application.routes.draw do
   #
   # Dashboard Area
   #
-  resource :dashboard, controller: "dashboard" do
+  resource :dashboard, controller: "dashboard", only: [:show] do
     member do
       get :projects
       get :issues
@@ -198,7 +198,7 @@ Gitlab::Application.routes.draw do
       end
     end
 
-    resource :repository do
+    resource :repository, only: [:show] do
       member do
         get "branches"
         get "tags"