summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorBryce Johnson <bryce@gitlab.com>2016-11-17 19:55:59 +0100
committerBryce Johnson <bryce@gitlab.com>2016-11-17 19:59:03 +0100
commited1cd9885828e820095374d56d79604b8cc94858 (patch)
tree7e17fb37a2b7c2cfa86804d8bf40938e68232f20 /app/controllers/users_controller.rb
parent726a414169e6c3219ff4fd410da3efd53fc7f912 (diff)
downloadgitlab-ce-ed1cd9885828e820095374d56d79604b8cc94858.tar.gz
Check all namespaces on validation of new username.namespace-validation
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb2
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