mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Make email addresses case insensitive when inviting users to services
Email addresses in invites should be case insensitive. This is to stop the bug where a user creates their account using a lower case email address (e.g. user1@gov.uk), but is then invited to a service using their email address in a different case (e.g. USER1.gov.uk) and sees an error message telling them that they can't accept an invite for a different email address.
This commit is contained in:
@@ -38,7 +38,7 @@ def accept_invite(token):
|
||||
|
||||
invited_user = invite_api_client.check_token(token)
|
||||
|
||||
if not current_user.is_anonymous and current_user.email_address != invited_user.email_address:
|
||||
if not current_user.is_anonymous and current_user.email_address.lower() != invited_user.email_address.lower():
|
||||
message = Markup("""
|
||||
You’re signed in as {}.
|
||||
This invite is for another email address.
|
||||
|
||||
Reference in New Issue
Block a user