HubAuth services: fix group authentication checking

If group authentication checking was enabled, any user would be allowed
This commit is contained in:
Min RK
2017-01-06 11:09:35 +01:00
parent 7cac874afc
commit 2015c701fa

View File

@@ -281,7 +281,7 @@ class HubAuthenticated(object):
if self.hub_users and name in self.hub_users: if self.hub_users and name in self.hub_users:
# user in whitelist # user in whitelist
return user_model return user_model
elif self.hub_groups and set(user_model['groups']).union(self.hub_groups): elif self.hub_groups and set(user_model['groups']).intersection(self.hub_groups):
# group in whitelist # group in whitelist
return user_model return user_model
else: else: