mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 09:24:21 +01:00
fix API for backend ldap on groups handling
This commit is contained in:
parent
47cddd04ca
commit
60a7329937
@ -248,9 +248,9 @@ class Backend(ldapcherry.backend.Backend):
|
||||
|
||||
ldap_client.unbind_s()
|
||||
|
||||
def add_to_group(self, username, groups):
|
||||
def add_to_groups(self, username, groups):
|
||||
ldap_client = self._bind()
|
||||
tmp = self._get_user(username, NO_ATTR)
|
||||
tmp = self._get_user(username, ALL_ATTRS)
|
||||
dn = tmp[0]
|
||||
attrs = tmp[1]
|
||||
attrs['dn'] = dn
|
||||
@ -261,9 +261,9 @@ class Backend(ldapcherry.backend.Backend):
|
||||
ldap_client.add_s(group,ldif)
|
||||
ldap_client.unbind_s()
|
||||
|
||||
def rm_from_group(self, username):
|
||||
def del_from_groups(self, username, groups):
|
||||
ldap_client = self._bind()
|
||||
tmp = self._get_user(username, NO_ATTR)
|
||||
tmp = self._get_user(username, ALL_ATTRS)
|
||||
dn = tmp[0]
|
||||
attrs = tmp[1]
|
||||
attrs['dn'] = dn
|
||||
|
Loading…
Reference in New Issue
Block a user