summaryrefslogtreecommitdiff
path: root/model.py
diff options
context:
space:
mode:
authorTom Galloway <github@tomgalloway.co.uk>2013-01-21 10:30:52 +0000
committerTom Galloway <github@tomgalloway.co.uk>2013-01-21 10:30:52 +0000
commitc4cddbfc0e42afb8e69dce08b561ac00b0f07b35 (patch)
tree8063906dc0cae2e2d8cf2e467fe27a9313ccdb34 /model.py
parenta312b6d288dc2f978237c1d5e309972d3c873327 (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.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/model.py b/model.py
index d3807d0..e0b3cd2 100644
--- a/model.py
+++ b/model.py
@@ -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