Charmworld is a single user website
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charmworld |
Triaged
|
High
|
Unassigned |
Bug Description
I believe only one person can be logged into charmworld at a time. The user collection may have a single user with _id: null in it. Our site, being authored by the same engineers had this bug, and I see same erroneous logic in trunk. This is the summary of the issue from juju-reports
"""
Save new users, update existing users. Not the other way round. Never include _id when it is None because mongo accepts _id: null as valid. The inverted logic was saving a user with a null _id to the db, since the operation was a save, the existing record was updated. It was impossible to insert a new user. I looked at the production db and it has only user user in it and it always reflects the last user to login.
"""
I have prepared a patch from the downstream change. I doubt it will apply cleanly.
I think this issue only affects charmers who need to login for some action.