mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
update model
This commit is contained in:
parent
4a9177a257
commit
41e46d53b5
6
model.py
6
model.py
@ -1,9 +1,9 @@
|
|||||||
class User(dict):
|
class User(dict):
|
||||||
""" Every user must have keys for a username, name, passphrase (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
|
is a bcrypt hash of the password), salt, groups, and an email address.
|
||||||
blank or None, but the keys must exist. """
|
They can be blank or None, but the keys must exist. """
|
||||||
def __init__(self, dict=None):
|
def __init__(self, dict=None):
|
||||||
for key in ['username', 'name', 'passphrase', 'email']:
|
for key in ['username', 'name', 'passphrase', 'salt', 'email']:
|
||||||
self[key] = ''
|
self[key] = ''
|
||||||
for key in ['groups']:
|
for key in ['groups']:
|
||||||
self[key] = []
|
self[key] = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user