[EE] Fix a bug where internal email pattern wasn't respected
EE MR for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22516.
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) 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 https://gitlab.com/gitlab-org/gitlab-ce/issues/52940.
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.
-
EE specific content should be in the top level /ee
folder - [-] For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan?
Edited by Rémy Coutable