Enforce lowercase email addresses in more places
authorMagnus Hagander <magnus@hagander.net>
Fri, 13 Oct 2017 12:08:21 +0000 (14:08 +0200)
committerMagnus Hagander <magnus@hagander.net>
Fri, 13 Oct 2017 12:09:22 +0000 (14:09 +0200)
commit022dd26283393048189a1fc46cde2c825be90072
tree19db63059484de879074e5833828fce4b3ffd0c5
parentb8c353ac28c85c6c6dec4bf74b822bcf3da1e414
Enforce lowercase email addresses in more places

We don't want two different accounts to exist with the same email
address only differing in case. This had already happened for a few
which have been manually fixed, since it turns out we only enforced the
rule on new account creation, not when accounts changed email address or
when they were created using oauth. Also add database level constraints to
make sure this cannot happen again if some codepath is missed.
pgweb/account/forms.py
pgweb/account/migrations/0002_lowercase_email.py [new file with mode: 0644]
pgweb/account/oauthclient.py
pgweb/account/views.py
pgweb/core/forms.py