Adding the is_admin field now per Elrond's sane request / advice. ;)
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 16 May 2011 23:20:50 +0000 (18:20 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 16 May 2011 23:21:23 +0000 (18:21 -0500)
mediagoblin/models.py

index 4a8673232bfca30153156e3aedde4e07fa47b99e..edb1d46d35d53dddb9bbed4af0f0f58babd6f176 100644 (file)
@@ -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):
         """