auth_fc: provide a clearer unlink confirmation message (#68367)
This commit is contained in:
parent
42cef0c4c2
commit
1c4b9c6d4b
|
@ -591,7 +591,7 @@ class UnlinkView(FormView):
|
|||
for link in links:
|
||||
logger.info('auth_fc: user %s unlinked from %s', self.request.user, link)
|
||||
hooks.call_hooks('event', name='fc-unlink', user=self.request.user)
|
||||
messages.info(self.request, _('The link with the FranceConnect account has been deleted.'))
|
||||
messages.info(self.request, _('Your account link to FranceConnect has been deleted.'))
|
||||
links.delete()
|
||||
# FC mapping config may have changed over time, hence it is impossible to tell which
|
||||
# attribute was verified at FC link time.
|
||||
|
|
|
@ -151,7 +151,7 @@ def test_create(settings, app, franceconnect, hooks, service):
|
|||
response = franceconnect.handle_logout(app, response.location)
|
||||
assert path(response.location) == '/accounts/'
|
||||
response = response.follow()
|
||||
assert 'The link with the FranceConnect account has been deleted' in response
|
||||
assert 'Your account link to FranceConnect has been deleted' in response
|
||||
|
||||
|
||||
def test_create_no_unicode_collision(settings, app, franceconnect, hooks, service):
|
||||
|
@ -217,7 +217,7 @@ def test_unlink_after_login_with_password(app, franceconnect, simple_user):
|
|||
response = response.click('Delete link')
|
||||
assert 'new_password1' not in response.form.fields
|
||||
response = response.form.submit(name='unlink').follow()
|
||||
assert 'The link with the FranceConnect account has been deleted' in response.text
|
||||
assert 'Your account link to FranceConnect has been deleted' in response.text
|
||||
# no logout from FC since we are not logged to it
|
||||
assert response.request.path == '/accounts/'
|
||||
|
||||
|
@ -234,7 +234,7 @@ def test_unlink_after_login_with_fc(app, franceconnect, simple_user):
|
|||
response = franceconnect.handle_logout(app, response.location)
|
||||
assert path(response.location) == '/accounts/'
|
||||
response = response.follow()
|
||||
assert 'The link with the FranceConnect account has been deleted' in response
|
||||
assert 'Your account link to FranceConnect has been deleted' in response
|
||||
|
||||
|
||||
def test_login_email_is_unique_and_already_linked(settings, app, franceconnect, caplog):
|
||||
|
@ -370,7 +370,7 @@ def test_can_change_password(settings, app, franceconnect):
|
|||
response = franceconnect.handle_logout(app, response.location)
|
||||
assert path(response.location) == '/accounts/'
|
||||
response = response.follow()
|
||||
assert 'The link with the FranceConnect account has been deleted' in response
|
||||
assert 'Your account link to FranceConnect has been deleted' in response
|
||||
assert len(response.pyquery('[href*="password/change"]')) > 0
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue