Make sure the user won't create another namespace
This fixed https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/32313185 and this only happened on MySQL, because without this, the user would have another namespace, and both namespaces are belonging to the user here. However user.namespace would only return one namespace, which one is database dependent. Even worse, since there's no ORDER BY, it should be considered completely random. We should refactor User#ensure_namespace_correct in the future.
Showing
Please register or sign in to comment