Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDrew Blessing <drew@blessing.io>2016-01-08 18:52:05 +0300
committerDrew Blessing <drew@blessing.io>2016-01-08 18:52:05 +0300
commitc1e974ed889dd31fbbddfa2daeb1a681043d5aa0 (patch)
treef18f39a74c7af8be6e7ed9ea8a4caac9b21c969c /config
parent255a63564bcb0cf3125be1fbcfe0d9c269e513cf (diff)
parent0b2fa3bfa4bea00973ad6b8c3dfb8302d84fe4de (diff)
Merge branch 'issue_3076' into 'master'
Fix problem with projects ending with .keys #3076 Closes #3076 Move route `:username.keys` below project's routes. This allow project's to handle names ending with `.keys` See merge request !1883
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 5b69d06eb76..4fcea1185c0 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -52,9 +52,6 @@ Rails.application.routes.draw do
API::API.logger Rails.logger
mount API::API => '/api'
- # Get all keys of user
- get ':username.keys' => 'profiles/keys#get_keys' , constraints: { username: /.*/ }
-
constraint = lambda { |request| request.env['warden'].authenticate? and request.env['warden'].user.admin? }
constraints constraint do
mount Sidekiq::Web, at: '/admin/sidekiq', as: :sidekiq
@@ -686,5 +683,8 @@ Rails.application.routes.draw do
end
end
+ # Get all keys of user
+ get ':username.keys' => 'profiles/keys#get_keys' , constraints: { username: /.*/ }
+
get ':id' => 'namespaces#show', constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ }
end