update model

This commit is contained in:
James Valleroy 2013-11-02 21:03:29 +00:00 committed by Nick Daly
parent 4a9177a257
commit 41e46d53b5

View File

@ -1,9 +1,9 @@
class User(dict): class User(dict):
""" Every user must have keys for a username, name, passphrase (this """ Every user must have keys for a username, name, passphrase (this
is a md5 hash of the password), groups, and an email address. They can be is a bcrypt hash of the password), salt, groups, and an email address.
blank or None, but the keys must exist. """ They can be blank or None, but the keys must exist. """
def __init__(self, dict=None): def __init__(self, dict=None):
for key in ['username', 'name', 'passphrase', 'email']: for key in ['username', 'name', 'passphrase', 'salt', 'email']:
self[key] = '' self[key] = ''
for key in ['groups']: for key in ['groups']:
self[key] = [] self[key] = []