summaryrefslogtreecommitdiff
path: root/config/routes/admin.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-19 19:46:40 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-23 20:38:24 -0500
commit4345bb8c507a11af694617187dea14284f48fb96 (patch)
tree20bc96bf6f90f8654492fb4e8b5cb1108e3d131d /config/routes/admin.rb
parent3cfcbcf35badfdb21244f7f16c8640cd83b49205 (diff)
downloadgitlab-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.rb8
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