Fix bugs (thanks to integration tests)

This commit is contained in:
sfigato 2020-11-30 19:16:36 +01:00
parent 6bd1beba9e
commit b400127cc6
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
2 changed files with 3 additions and 1 deletions

View File

@ -233,6 +233,8 @@ class Member(object):
self.base_dn = client.base_dn
self.name = name
self._entry = LDAPEntry(self.dn)
self[self.id_tag] = name
self._entry["ou"] = self.ou
if kwargs:
_hydrate(self, kwargs)

View File

@ -45,7 +45,7 @@ class Group(mixins.Singleton, mixins.Entry, mixins.Member):
_instances = dict() # type: ignore
id_tag = "cn"
ou = "Congregations"
ldap_attributes = ["uid", "ou", "member"]
ldap_attributes = ["cn", "ou", "member"]
memeber_classes = {"Hackers": User, "Robots": Service}
async def add_member(self, member):