Ask password at unlinking when the user has no usable password (fixes #10524) (bis).
This commit is contained in:
parent
f1b2ced61b
commit
5704e98495
|
@ -385,6 +385,9 @@ class UnlinkView(LoggerMixin, SingleObjectMixin, FormView):
|
|||
return ctx
|
||||
|
||||
def form_valid(self, form):
|
||||
form.save()
|
||||
self.logger.info(u'user %s has set a password', self.fc_account.user)
|
||||
self.fc_account.user.backend = 'authentic2.backends.models_backend.ModelBackend'
|
||||
msg_tpl = _('The link with the FranceConnect account {fc_account} has been deleted.')
|
||||
msg = msg_tpl.format(fc_account=self.fc_account)
|
||||
self.logger.info(u'user %s unlinked from %s', self.fc_account.user, self.fc_account)
|
||||
|
|
Loading…
Reference in New Issue