mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 08:28:15 -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:
@@ -40,7 +40,7 @@ def sign_in():
|
||||
|
||||
if user and session.get('invited_user'):
|
||||
invited_user = session.get('invited_user')
|
||||
if user.email_address != invited_user['email_address']:
|
||||
if user.email_address.lower() != invited_user['email_address'].lower():
|
||||
flash("You can't accept an invite for another person.")
|
||||
session.pop('invited_user', None)
|
||||
abort(403)
|
||||
|
||||
Reference in New Issue
Block a user