mozilla / django-browserid

Django application for adding BrowserID support.
Mozilla Public License 2.0
180 stars 80 forks source link

Ensure backend attribute exists on user objects. #165

Closed Osmose closed 11 years ago

Osmose commented 11 years ago

A user's email is only included in the browserid_info div if it was authenticated by the BrowserIDBackend, which is signified by the backend attribute on the user object. However, if a user is retrieved from the session, the backend attribute isn't set by default.

In that case, the user object is retrieved by the get_user method on the backend that first logged the user in. This commit updates that method so that it sets the backend attribute on the user object, ensuring that it will always have that attribute and can be correctly identified as being authed by the BrowserIDBackend.

Oh, and I also added Python 3.3 to the allowed failures list in Travis until we figure out why lxml doesn't want to install on it.

Osmose commented 11 years ago

@peterbe r?

peterbe commented 11 years ago

In that case...