admins get misleading error message while creating a project when project limit is reached

Summary

I tried, as an Gitlab-Admin, to create a new Project within my namespace. Using /projects/new and selecting my username as namespace, i get the following error:

The form contains the following error:
Namespace is not valid

Creating Projects for other Namespaces does work as intended.

Steps to reproduce

  • be admin
  • have reached the number of projects
  • go to /projects/new
  • enter any project name
  • choose your user namespace
  • click create

What is the current bug behavior?

As Admin you get

The form contains the following error:
Namespace is not valid

when chosing your user namespace as target namespace for a new project

What is the expected correct behavior?

Getting a error message telling me that i have reached the project limit.

Relevant logs and/or screenshots

Environment

Gitlab Version: 12.3.5 (2417d5be)

Proposal

On the new project creation screen:

  • Check for limit
  • add warning banner:
    • Heading: New project creation has been disabled
    • You have reached the maximum limit of projects you can create. Please delete any projects you are not using or upgrade your GitLab subscription level.
  • disable the relevant buttons
    • Remove link from card (along with hover state).
    • Use $gray-50 (#f0f0f0) for background.
    • Use $gray-500 (#666) for text.
  • Resolve button behavior inconsistency (this could be a separate issue)
New project creation screen Disabled state
Screen_Shot_2022-03-15_at_4.33.00_PM CleanShot_2022-04-21_at_08.57.19_2x
Previous proposal
Valid state - able to create new projects Project limit reached
Block_project_creation-1 Kapture_2022-03-08_at_12.35.49
Edited by Daniel Mora