Convert the add_email page to use the Observer API
authorFrancois Marier <francois@debian.org>
Mon, 23 Jul 2012 05:42:01 +0000 (17:42 +1200)
committerFrancois Marier <francois@debian.org>
Tue, 24 Jul 2012 06:21:01 +0000 (18:21 +1200)
commit8b4dff7bbd491366fd75fa1fd7309ff1992e6e4e
treec1baa3712d5af182669f945fe89c6221cfe6c711
parent96513befe1668f0759968bd8417eb8c7e8fbde09
Convert the add_email page to use the Observer API

Because we are using request() for something else than what it was
intended, we need to silently swap our browserid_user variable to
match the new state that BrowserID keeps.

Specifically, calling request() changes the currently logged in
user as far as BrowserID is concerned and the onlogin event will
get called so we need to override it to make sure that the user
isn't logged out and back again (which would create a new account
with the email that was supposed to be added to the existing
account).
libravatar/account/views.py
libravatar/templates/account/add_email.html
libravatar/templates/account/browserid_emailalreadyconfirmed.html [deleted file]
libravatar/templates/account/browserid_emailalreadyconfirmed.json [new file with mode: 0644]
libravatar/templates/account/browserid_invalidassertion.html [deleted file]
libravatar/templates/account/browserid_invalidassertion.json [new file with mode: 0644]
libravatar/templates/account/browserid_noassertion.html [deleted file]
libravatar/templates/account/delete.html
static/js/libravatar.js