diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-05-16 18:20:50 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-05-16 18:21:23 -0500 |
commit | 18cf34d4701f86f5c8951ae0d340824b4b4f19ac (patch) | |
tree | 73a01105df903dc175c011ea141ac4337b221c47 /mediagoblin/models.py | |
parent | 3e4a2f2be7c4740f7192c18cf9d8c9cd9dfedad1 (diff) | |
download | mediagoblin-18cf34d4701f86f5c8951ae0d340824b4b4f19ac.tar.lz mediagoblin-18cf34d4701f86f5c8951ae0d340824b4b4f19ac.tar.xz mediagoblin-18cf34d4701f86f5c8951ae0d340824b4b4f19ac.zip |
Adding the is_admin field now per Elrond's sane request / advice. ;)
Diffstat (limited to 'mediagoblin/models.py')
-rw-r--r-- | mediagoblin/models.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mediagoblin/models.py b/mediagoblin/models.py index 4a867323..edb1d46d 100644 --- a/mediagoblin/models.py +++ b/mediagoblin/models.py @@ -42,7 +42,8 @@ class User(Document): 'pw_hash': unicode, 'email_verified': bool, 'status': unicode, - 'verification_key': unicode + 'verification_key': unicode, + 'is_admin': bool, } required_fields = ['username', 'created', 'pw_hash', 'email'] @@ -51,7 +52,8 @@ class User(Document): 'created': datetime.datetime.utcnow, 'email_verified': False, 'status': u'needs_email_verification', - 'verification_key': lambda: unicode( uuid.uuid4() ) } + 'verification_key': lambda: unicode(uuid.uuid4()), + 'is_admin': False} def check_login(self, password): """ |