1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-25 18:54:29 +01:00

fix API for backend ldap on groups handling

This commit is contained in:
kakwa 2015-06-16 21:58:44 +02:00
parent 47cddd04ca
commit 60a7329937

View File

@ -248,9 +248,9 @@ class Backend(ldapcherry.backend.Backend):
ldap_client.unbind_s() ldap_client.unbind_s()
def add_to_group(self, username, groups): def add_to_groups(self, username, groups):
ldap_client = self._bind() ldap_client = self._bind()
tmp = self._get_user(username, NO_ATTR) tmp = self._get_user(username, ALL_ATTRS)
dn = tmp[0] dn = tmp[0]
attrs = tmp[1] attrs = tmp[1]
attrs['dn'] = dn attrs['dn'] = dn
@ -261,9 +261,9 @@ class Backend(ldapcherry.backend.Backend):
ldap_client.add_s(group,ldif) ldap_client.add_s(group,ldif)
ldap_client.unbind_s() ldap_client.unbind_s()
def rm_from_group(self, username): def del_from_groups(self, username, groups):
ldap_client = self._bind() ldap_client = self._bind()
tmp = self._get_user(username, NO_ATTR) tmp = self._get_user(username, ALL_ATTRS)
dn = tmp[0] dn = tmp[0]
attrs = tmp[1] attrs = tmp[1]
attrs['dn'] = dn attrs['dn'] = dn