From 18cf34d4701f86f5c8951ae0d340824b4b4f19ac Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Mon, 16 May 2011 18:20:50 -0500 Subject: [PATCH] Adding the is_admin field now per Elrond's sane request / advice. ;) --- mediagoblin/models.py | 6 ++++-- 1 file 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): """