diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2018-03-27 20:39:18 +0300 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2018-03-27 20:39:18 +0300 |
commit | de0c4730bb83b94195678e5ad4865ea648e6585f (patch) | |
tree | 3ea0fd48c5736b0f5b328f117c3db0508a371d22 /config/routes/user.rb | |
parent | dc5b5130d573a48fc34fa62862a1ad6da776b0d0 (diff) | |
parent | a1cde68d208437a470267e28ccff66fe8be88c2e (diff) |
Merge branch 'master' into add-canary-favicon
Diffstat (limited to 'config/routes/user.rb')
-rw-r--r-- | config/routes/user.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/config/routes/user.rb b/config/routes/user.rb index e682dcd6663..57fb37530bb 100644 --- a/config/routes/user.rb +++ b/config/routes/user.rb @@ -1,5 +1,3 @@ -require 'constraints/user_url_constrainer' - devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, registrations: :registrations, passwords: :passwords, @@ -22,20 +20,20 @@ scope(constraints: { username: Gitlab::PathRegex.root_namespace_route_regex }) d get :contributed, as: :contributed_projects get :snippets get :exists - get '/', to: redirect('/%{username}'), as: nil + get '/', to: redirect('%{username}'), as: nil end # Compatibility with old routing # TODO (dzaporozhets): remove in 10.0 - get '/u/:username', to: redirect('/%{username}') + get '/u/:username', to: redirect('%{username}') # TODO (dzaporozhets): remove in 9.0 - get '/u/:username/groups', to: redirect('/users/%{username}/groups') - get '/u/:username/projects', to: redirect('/users/%{username}/projects') - get '/u/:username/snippets', to: redirect('/users/%{username}/snippets') - get '/u/:username/contributed', to: redirect('/users/%{username}/contributed') + get '/u/:username/groups', to: redirect('users/%{username}/groups') + get '/u/:username/projects', to: redirect('users/%{username}/projects') + get '/u/:username/snippets', to: redirect('users/%{username}/snippets') + get '/u/:username/contributed', to: redirect('users/%{username}/contributed') end -constraints(UserUrlConstrainer.new) do +constraints(::Constraints::UserUrlConstrainer.new) do # Get all keys of user get ':username.keys' => 'profiles/keys#get_keys', constraints: { username: Gitlab::PathRegex.root_namespace_route_regex } |