Fix a bug where internal email pattern wasn't respected
EE MR at https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8421.
What does this MR do?
This fixes an issue where the "internal email address pattern" was being ignored unless the current_user
given to Users::BuildService
is an admin.
This bug was detected while logging in as a LDAP user (#52940 (closed)) but it also happens for regular user sign ups too.
The fix is to set the external
param based on the "internal email address pattern" (if enabled) regardless of the current_user
, and if it hasn't been overridden before (only possible if current_user
is an admin).
What are the relevant issue numbers?
Closes #52940 (closed).
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
Edited by Rémy Coutable