From fbbbd0d835cfb151f121e20fed45cc557cd67667 Mon Sep 17 00:00:00 2001 From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de> Date: Sat, 17 Feb 2018 19:31:27 +0100 Subject: [PATCH] Fix static user backend --- auth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth.py b/auth.py index 240fff4..0323a2f 100644 --- a/auth.py +++ b/auth.py @@ -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())) -- GitLab