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
diff options
context:
space:
mode:
authorBryce Johnson <bryce@gitlab.com>2016-11-17 21:55:59 +0300
committerBryce Johnson <bryce@gitlab.com>2016-11-17 21:59:03 +0300
commited1cd9885828e820095374d56d79604b8cc94858 (patch)
tree7e17fb37a2b7c2cfa86804d8bf40938e68232f20 /app/controllers/users_controller.rb
parent726a414169e6c3219ff4fd410da3efd53fc7f912 (diff)
Check all namespaces on validation of new username.
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