From d408135321ba9f8b5334c89dd44551c617140818 Mon Sep 17 00:00:00 2001 From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de> Date: Sat, 17 Feb 2018 19:29:16 +0100 Subject: [PATCH] Do not duplicate groups in user manager ref #160 --- auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth.py b/auth.py index 899509d..240fff4 100644 --- a/auth.py +++ b/auth.py @@ -43,7 +43,7 @@ class UserManager: def login(self, username, password, permanent=False): for backend in self.backends: if backend.authenticate(username, password): - groups = backend.groups(username, password) + groups = sorted(list(set(backend.groups(username, password)))) return User(username, groups, obsolete=backend.obsolete, permanent=permanent) return None -- GitLab