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-10-10 17:54:55 +0300
committerBryce Johnson <bryce@gitlab.com>2016-10-15 09:28:55 +0300
commit5439bd9f952c7e7ee9fa10613655a9761396e1f9 (patch)
treed1b9bc3462d99a6571a5f7107a35216e87af7d3d
parent85db5ba847ffc8f4b71ad9fe0ba22ab42f90b3e4 (diff)
Attempt to fix username validation ruby.
-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 7a2bd83f22f..1aa22995692 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: User.where(username: params[:username].to_s).any? }
+ render json: { exists: !Namespace.where(name: params[:username]).nil? }
end
private