Cells: Fix all the cross joins between users and namespaces
This epic will contain issues to fix all the cross joins between `users` and `namespaces`. All the issues in this epic were created as a result of the issue: https://gitlab.com/gitlab-org/gitlab/-/issues/415196 and its merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124319. ## Why cross joins are not allowed between `users` and `namespaces`? The table `users` is planned to be moved to the [`gitlab_main_clusterwide`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/db/gitlab_schemas/gitlab_main_clusterwide.yaml) database. Which means that it wont reside on the same database where `namespaces` table is going to be. ## Why do we have this epic? As part of the MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124319, we identified all the cross joins between the tables `users` and `namespaces`, and marked all the associations or code blocks to temporarily allow those violations with issues to fix them. ## How to approach each one of the issues in this epic? - Remove the `allow_cross_joins_across_databases` that are referenced in each issue, and see which tests are failing. - Refer to this documentation on how to resolve the cross joins https://docs.gitlab.com/ee/development/database/multiple_databases.html#removing-joins-between-ci-and-non-ci-tables - Remove the allowed cross joins, and make sure the pipeline is still green
epic