diff options
| author | Bryce Johnson <bryce@gitlab.com> | 2016-11-17 19:55:59 +0100 |
|---|---|---|
| committer | Bryce Johnson <bryce@gitlab.com> | 2016-11-17 19:59:03 +0100 |
| commit | ed1cd9885828e820095374d56d79604b8cc94858 (patch) | |
| tree | 7e17fb37a2b7c2cfa86804d8bf40938e68232f20 /app | |
| parent | 726a414169e6c3219ff4fd410da3efd53fc7f912 (diff) | |
| download | gitlab-ce-namespace-validation.tar.gz | |
Check all namespaces on validation of new username.namespace-validation
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/users_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c4508ccc3b9..6e29f1e8a65 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -86,7 +86,7 @@ class UsersController < ApplicationController end def exists - render json: { exists: Namespace.where(path: params[:username].downcase).any? } + render json: { exists: !!Namespace.find_by_path_or_name(params[:username]) } end private |
