Commit 5acbe6f4 authored by Robin Sonnabend's avatar Robin Sonnabend

Fix static user backend

parent 4ba395e2
......@@ -143,7 +143,7 @@ class StaticUserManager:
username: password
for (username, password, groups) in users
}
self.groups = {
self.group_map = {
username: groups
for (username, password, groups) in users
}
......@@ -154,8 +154,8 @@ class StaticUserManager:
and self.passwords[username] == password)
def groups(self, username, password=None):
if username in self.groups:
yield from self.groups[username]
if username in self.group_map:
yield from self.group_map[username]
def all_groups(self):
yield from list(set(group for group in groups.values()))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment