BigW Consortium Gitlab

Commit e252ee5b by Rémy Coutable

Merge branch 'namespace-validation' into 'master'

Check all namespaces on validation of new username. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24519 and https://gitlab.com/gitlab-org/gitlab-ce/issues/24580 See merge request !7537
parents 492ead3f ed1cd988
...@@ -86,7 +86,7 @@ class UsersController < ApplicationController ...@@ -86,7 +86,7 @@ class UsersController < ApplicationController
end end
def exists def exists
render json: { exists: Namespace.where(path: params[:username].downcase).any? } render json: { exists: !!Namespace.find_by_path_or_name(params[:username]) }
end end
private private
......
---
title: Check all namespaces on validation of new username.
merge_request: 7537
author:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment