Adding the is_admin field now per Elrond's sane request / advice. ;)
This commit is contained in:
parent
3e4a2f2be7
commit
18cf34d470
@ -42,7 +42,8 @@ class User(Document):
|
|||||||
'pw_hash': unicode,
|
'pw_hash': unicode,
|
||||||
'email_verified': bool,
|
'email_verified': bool,
|
||||||
'status': unicode,
|
'status': unicode,
|
||||||
'verification_key': unicode
|
'verification_key': unicode,
|
||||||
|
'is_admin': bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
required_fields = ['username', 'created', 'pw_hash', 'email']
|
required_fields = ['username', 'created', 'pw_hash', 'email']
|
||||||
@ -51,7 +52,8 @@ class User(Document):
|
|||||||
'created': datetime.datetime.utcnow,
|
'created': datetime.datetime.utcnow,
|
||||||
'email_verified': False,
|
'email_verified': False,
|
||||||
'status': u'needs_email_verification',
|
'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):
|
def check_login(self, password):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user