diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-26 17:10:03 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-11-07 21:52:09 +0300 |
commit | 5d14337baff9c2ae8091b7b4ab954f8024449a52 (patch) | |
tree | d5d18ed1d0c31e5aff9d029b483eda418a0c72de /config | |
parent | 414c4e3fd83a6a3cae623dcc8135d6ef09a30562 (diff) |
Free up `labels` as a group name
Diffstat (limited to 'config')
-rw-r--r-- | config/routes/group.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/config/routes/group.rb b/config/routes/group.rb index f4d520a2518..ccd4ea7a8dd 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -34,10 +34,6 @@ constraints(GroupUrlConstrainer.new) do end end - resources :labels, except: [:show] do - post :toggle_subscription, on: :member - end - scope path: '-' do namespace :settings do resource :ci_cd, only: [:show], controller: 'ci_cd' @@ -46,6 +42,10 @@ constraints(GroupUrlConstrainer.new) do resources :variables, only: [:index, :show, :update, :create, :destroy] resources :children, only: [:index] + + resources :labels, except: [:show] do + post :toggle_subscription, on: :member + end end end @@ -58,4 +58,10 @@ constraints(GroupUrlConstrainer.new) do put '/', action: :update delete '/', action: :destroy end + + # Legacy paths should be defined last, so they would be ignored if routes with + # one of the previously reserved words exist. + scope(path: 'groups/*group_id') do + Gitlab::Routing.redirect_legacy_paths(self, :labels) + end end |