Minor refactoring of IsInGroup so it can take arrays and dicts
[mirror/userdir-ldap.git] / ud-generate
index 858d736..db1c077 100755 (executable)
@@ -172,7 +172,7 @@ def IsInGroup(account, allowed, current_host):
   supgroups=[]
   addGroups(supgroups, account['supplementaryGid'], account['uid'], current_host)
   for g in supgroups:
-     if allowed.has_key(g):
+     if g in allowed:
         return True
   return False