mirror of
https://github.com/kakwa/ldapcherry
synced 2025-07-04 20:37:48 +02:00
fix API for backend ldap on groups handling
This commit is contained in:
parent
47cddd04ca
commit
60a7329937
1 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue