Teach pgweb to handle secondary email addresses
authorMagnus Hagander <magnus@hagander.net>
Fri, 7 Aug 2020 11:32:10 +0000 (13:32 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 11 Aug 2020 09:33:46 +0000 (11:33 +0200)
commitfb99733afece9bae4d76c8b4dac44a32b31a8031
tree904a312ba24703b4378db72e20509a92e25b4fe2
parentb97aa1d581946c1b601cd5002fbe290b717ae59f
Teach pgweb to handle secondary email addresses

This allows each account to have more than one email address, of which
one is primary. Adding more addresses will trigger an email with a
verification link (of course). The field previously known as "email" is
now changed to be "primary email".

Change the profile form to allow freely changing between the added
addresses which one is the primary. Remove the functionality to directly
change the primary email -- instead one has to add a new address first
and then change to that one, which simplifies several things in the
handling.
12 files changed:
docs/authentication.rst
pgweb/account/forms.py
pgweb/account/migrations/0005_secondaryemail.py [new file with mode: 0644]
pgweb/account/models.py
pgweb/account/urls.py
pgweb/account/views.py
pgweb/core/management/commands/cleanup_old_records.py
templates/account/email_add_email.txt [new file with mode: 0644]
templates/account/email_change_email.txt [deleted file]
templates/account/emailchangecompleted.html [deleted file]
templates/account/emailchangeform.html [deleted file]
templates/account/userprofileform.html