Make pending invitations search case insensitive
What does this MR do and why?
Make pending invitations search case insensitive
- fixes the bug where someone is invited with a case sensitive email as: BOBBY_TABLES@EXAMPLE.COM, but the users.email and emails table downcases emails before saving so we never find a match with the members.invite_email table that does not enforce case insensitivity.
- also fixes a latent bug where private_commit_email could have upper case value so it is accepted as well if the invite_email uses it with case sensitivity.
- see #457938 (closed)
Changelog: fixed
DB query analysis
note index added in !152296 (merged) and deployed to all GitLab.com environments(post deployment ran). I believe this fits as a slow query likely on on GitLab.com, due to members table size and taking 3 minutes to create, so it can go in same milestone as the index add, but feel free to push back on that.
- old query: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/28128/commands/87605
- new query with index: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/28128/commands/87595
- further analysis: !152275 (comment 1896748845) and !152275 (comment 1896780730)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #457938 (closed)
Edited by Doug Stull