diff options
author | Tom Galloway <github@tomgalloway.co.uk> | 2013-01-21 10:30:52 +0000 |
---|---|---|
committer | Tom Galloway <github@tomgalloway.co.uk> | 2013-01-21 10:30:52 +0000 |
commit | c4cddbfc0e42afb8e69dce08b561ac00b0f07b35 (patch) | |
tree | 8063906dc0cae2e2d8cf2e467fe27a9313ccdb34 /model.py | |
parent | a312b6d288dc2f978237c1d5e309972d3c873327 (diff) |
Changes to get user management screens started. Updated UserStore to add all expected functions. Added tests for these functions.
Diffstat (limited to 'model.py')
-rw-r--r-- | model.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,14 +1,15 @@ class User(dict): - """ Every user must have keys for a username, name, password (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 blank or None, but the keys must exist. """ def __init__(self, dict=None): - for key in ['username', 'name', 'password', 'email']: + for key in ['username', 'name', 'passphrase', 'email']: self[key] = '' for key in ['groups']: self[key] = [] - for key in dict: - self[key] = dict[key] + if dict: + for key in dict: + self[key] = dict[key] def __getattr__(self, attr): return None |