diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-19 19:46:40 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-23 20:38:24 -0500 |
commit | 4345bb8c507a11af694617187dea14284f48fb96 (patch) | |
tree | 20bc96bf6f90f8654492fb4e8b5cb1108e3d131d /config/routes/admin.rb | |
parent | 3cfcbcf35badfdb21244f7f16c8640cd83b49205 (diff) | |
download | gitlab-ce-4345bb8c507a11af694617187dea14284f48fb96.tar.gz |
Fix ambiguous routing issues by teaching router about reserved words
Diffstat (limited to 'config/routes/admin.rb')
-rw-r--r-- | config/routes/admin.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/config/routes/admin.rb b/config/routes/admin.rb index 48993420ed9..6e34dd3a2eb 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -36,7 +36,7 @@ namespace :admin do scope(path: 'groups/*id', controller: :groups, - constraints: { id: Gitlab::Regex.namespace_route_regex, format: /(html|json|atom)/ }) do + constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ }) do scope(as: :group) do put :members_update @@ -68,10 +68,12 @@ namespace :admin do resources :projects, only: [:index] - scope(path: 'projects/*namespace_id', as: :namespace) do + scope(path: 'projects/*namespace_id', + as: :namespace, + constraints: { namespace_id: Gitlab::PathRegex.full_namespace_route_regex }) do resources(:projects, path: '/', - constraints: { id: Gitlab::Regex.project_route_regex }, + constraints: { id: Gitlab::PathRegex.project_route_regex }, only: [:show]) do member do |