diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-11-21 12:41:44 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-11-21 12:41:44 +0200 |
commit | beb638ca0379472eb15f840249321cdaca7bf5be (patch) | |
tree | b776cb37b4fcb455c7a958bf25cb709f3223017d /config | |
parent | 900999f8180e49aa1677286e3e0cfa08d47829a7 (diff) | |
download | gitlab-ce-beb638ca0379472eb15f840249321cdaca7bf5be.tar.gz |
Fix 404 on some group pages when name contains dotdz-fix-group-name-dot
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'config')
-rw-r--r-- | config/routes/group.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/config/routes/group.rb b/config/routes/group.rb index 068e0b6e843..a3a001178b4 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -14,7 +14,9 @@ end resources :groups, only: [:index, :new, :create] -scope(path: 'groups/:id', controller: :groups) do +scope(path: 'groups/:id', + controller: :groups, + constraints: { id: Gitlab::Regex.namespace_route_regex }) do get :edit, as: :edit_group get :issues, as: :issues_group get :merge_requests, as: :merge_requests_group @@ -22,7 +24,10 @@ scope(path: 'groups/:id', controller: :groups) do get :activity, as: :activity_group end -scope(path: 'groups/:group_id', module: :groups, as: :group) do +scope(path: 'groups/:group_id', + module: :groups, + as: :group, + constraints: { group_id: Gitlab::Regex.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 @@ -37,4 +42,4 @@ scope(path: 'groups/:group_id', module: :groups, as: :group) do end # Must be last route in this file -get 'groups/:id' => 'groups#show', as: :group_canonical +get 'groups/:id' => 'groups#show', as: :group_canonical, constraints: { id: Gitlab::Regex.namespace_route_regex } |