Fix: Ensure placeholder users are organization users
What does this MR do and why?
While verifying data related to Organization Membership, it turned out that since the deploy of this MR, some users do not have an organization associated with them.
The logic in Gitlab::Import::PlaceholderUserCreator was using User model directly. And the referenced MR removed the logic for organization association.
We can address this by using Users::AuthorizedBuildService for creating the placeholder users. This class will also take care of namespace creation
References
- Related issue with more details: Missing organization for placeholder user (#545963 - closed)
- MR that introduced the bug Remove User after commit hook for assigning use... (!175288 - merged)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Rutger Wessels