mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 13:39:57 -04:00
Allow non-gov email addresses to be changed to gov email addresses
When a user's email address is updated, we not allowing it to be changed to a non-government email address. We now allow a non-gov email address to be changed to another non-gov email address. Government email addresses still cannot be changed to non-government email addresses. Also fixes the link in the error message on the ChangeEmailAddress form - this was being escaped before.
This commit is contained in:
@@ -716,6 +716,10 @@ class ChangeEmailForm(StripWhitespaceForm):
|
||||
raise ValidationError("The email address is already in use")
|
||||
|
||||
|
||||
class ChangeNonGovEmailForm(ChangeEmailForm):
|
||||
email_address = email_address(gov_user=False)
|
||||
|
||||
|
||||
class ChangeMobileNumberForm(StripWhitespaceForm):
|
||||
mobile_number = international_phone_number()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user