Set the name of a user-namespace to the user name
What does this MR do?
Instead of setting the name of the namespace to the user's username, set it to the user's name.
This is more consistent with how we name the routes: The route-name of a namespace is the human name of the routable. In the case of a user-namespace, this is the owner's name.
When we change a user's name (both on create and update), we now also update the namespace-name to the user's name. This will make sure that if we also correctly update all the nested routes.
To do this, we needed to soften up the Namespace#name
validation, I don't
think this would cause problems as we don't use that field for building paths anymore.
We don't need to rename the existing namespaces, as that name is not visible anywhere, it's only used for the update.
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/54240
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - [-] Documentation created/updated
-
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.