summaryrefslogtreecommitdiff
path: root/yarns/lib.py
diff options
context:
space:
mode:
Diffstat (limited to 'yarns/lib.py')
-rw-r--r--yarns/lib.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/yarns/lib.py b/yarns/lib.py
index 96c93ad..a9ba526 100644
--- a/yarns/lib.py
+++ b/yarns/lib.py
@@ -205,11 +205,14 @@ def start_qvisqve():
with open(filename, 'w') as f:
yaml.safe_dump(spec, stream=f)
- users = V['users']
- for name in users or []:
+ users = V['users'] or {}
+ print('users:', users)
+ for name, user in users.items():
+ print('add user', name, user)
filename = os.path.join(store, 'user', name)
spec = {
- 'hashed_secret': sh.hash(users[name]),
+ 'hashed_secret': sh.hash(user['password']),
+ 'allowed_scopes': user['scopes'],
}
with open(filename, 'w') as f:
yaml.safe_dump(spec, stream=f)