diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-26 16:10:03 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-11-07 19:52:09 +0100 |
commit | 5d14337baff9c2ae8091b7b4ab954f8024449a52 (patch) | |
tree | d5d18ed1d0c31e5aff9d029b483eda418a0c72de /config/routes | |
parent | 414c4e3fd83a6a3cae623dcc8135d6ef09a30562 (diff) | |
download | gitlab-ce-5d14337baff9c2ae8091b7b4ab954f8024449a52.tar.gz |
Free up `labels` as a group name
Diffstat (limited to 'config/routes')
-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 |