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:
Katie Smith
2019-04-18 16:03:13 +01:00
parent 33aa16661e
commit d689b031a2
4 changed files with 84 additions and 3 deletions

View File

@@ -14,7 +14,7 @@
<div class="grid-row">
<div class="column-three-quarters">
{% call form_wrapper() %}
{{ textbox(form.email_address) }}
{{ textbox(form.email_address, safe_error_message=True) }}
{{ page_footer(
'Save',
back_link=url_for('.edit_user_permissions', service_id=service_id, user_id=user.id),