Commit ed1cd988 authored by Bryce Johnson's avatar Bryce Johnson

Check all namespaces on validation of new username.

parent 726a4141
...@@ -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