mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
15 lines
511 B
Python
15 lines
511 B
Python
class User(dict):
|
|
""" Every user must have keys for a username, name, password (this
|
|
is a md5 hash of the password), groups, and an email address. They can be
|
|
blank or None, but the keys must exist. """
|
|
def __init__(self, dict=None):
|
|
for key in ['username', 'name', 'password', 'email']:
|
|
self[key] = ''
|
|
for key in ['groups']:
|
|
self[key] = []
|
|
for key in dict:
|
|
self[key] = dict[key]
|
|
|
|
def __getattr__(self, attr):
|
|
return None
|