From e0c3581a4c88c082818738401f164d4a88510467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Wed, 4 Mar 2020 21:38:21 +0100 Subject: [PATCH] fixed ##193 --- geruecht/controller/accesTokenController.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/geruecht/controller/accesTokenController.py b/geruecht/controller/accesTokenController.py index b23e2d1..dd7a4ae 100644 --- a/geruecht/controller/accesTokenController.py +++ b/geruecht/controller/accesTokenController.py @@ -33,9 +33,11 @@ class AccesTokenController(metaclass=Singleton): def checkBar(self, user): if (userController.checkBarUser(user)): - user.group.append(BAR) - elif BAR in user.group: - user.group.remove(BAR) + if BAR not in user.group: + user.group.append(BAR) + else: + while BAR in user.group: + user.group.remove(BAR) def validateAccessToken(self, token, group): """ Verify Accestoken