diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-26 18:49:07 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-11-07 21:52:09 +0300 |
commit | 5dde0536c323d14fef2327a8d553b5f8a8a7b2d0 (patch) | |
tree | bf95d6594a0925aff3b0c3ee3a5302667bcdb168 /config/routes/group.rb | |
parent | 5d14337baff9c2ae8091b7b4ab954f8024449a52 (diff) |
Free up `avatar`, `group_members` and `milestones` as paths
Diffstat (limited to 'config/routes/group.rb')
-rw-r--r-- | config/routes/group.rb | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/config/routes/group.rb b/config/routes/group.rb index ccd4ea7a8dd..11124eaec51 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -20,20 +20,6 @@ constraints(GroupUrlConstrainer.new) do module: :groups, as: :group, constraints: { group_id: Gitlab::PathRegex.full_namespace_route_regex }) do - resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do - post :resend_invite, on: :member - delete :leave, on: :collection - end - - resource :avatar, only: [:destroy] - resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :edit, :update, :new, :create] do - member do - get :merge_requests - get :participants - get :labels - end - end - scope path: '-' do namespace :settings do resource :ci_cd, only: [:show], controller: 'ci_cd' @@ -46,6 +32,21 @@ constraints(GroupUrlConstrainer.new) do resources :labels, except: [:show] do post :toggle_subscription, on: :member end + + resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :edit, :update, :new, :create] do + member do + get :merge_requests + get :participants + get :labels + end + end + + resource :avatar, only: [:destroy] + + resources :group_members, only: [:index, :create, :update, :destroy], concerns: :access_requestable do + post :resend_invite, on: :member + delete :leave, on: :collection + end end end @@ -62,6 +63,6 @@ constraints(GroupUrlConstrainer.new) do # 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) + Gitlab::Routing.redirect_legacy_paths(self, :labels, :milestones, :group_members) end end |