diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-10-28 12:14:52 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-10-28 12:14:52 +0100 |
commit | 7790ecb12466e2022061ca5cd0b0565975349681 (patch) | |
tree | 84e7c761f38de6ea556d2a6539573eead2cd70af | |
parent | 5b5a863282fb37508a4536bdbaa670912317aebc (diff) | |
download | pykolab-7790ecb12466e2022061ca5cd0b0565975349681.tar.gz |
Allow the user to be passed to be a simple dn basestring
-rw-r--r-- | pykolab/auth/ldap/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py index 8b224ee..5390a86 100644 --- a/pykolab/auth/ldap/__init__.py +++ b/pykolab/auth/ldap/__init__.py @@ -706,6 +706,9 @@ class LDAP(object): def _set_user_attribute(self, user, attribute, value): self._bind() + if isinstance(user, basestring): + user = { "dn": user } + attribute = attribute.lower() mode = None |