Explorar el Código

move assertion so it only checks if user is within that ACL group

Daniel Gruno hace 5 años
padre
commit
fe72fd559a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      pypubsub.py

+ 1 - 1
pypubsub.py

@@ -192,8 +192,8 @@ class Subscriber:
                 groups = await pypubsub_ldap.get_groups(self.server.lconfig, u, p)
                 # Make sure each ACL segment is a list of topics
                 for k, v in self.server.lconfig['acl'].items():
-                    assert isinstance(v, list), f"ACL segment {k} for user {u} is not a list of topics!"
                     if k in groups:
+                        assert isinstance(v, list), f"ACL segment {k} for user {u} is not a list of topics!"
                         print(f"Enabling ACL segment {k} for user {u}")
                         acl[k] = v
                 return acl