Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

support for ldap whoami() operation

  • Loading branch information...
commit e50daab5837583ea19111edf4ad0a69ce0a8104d 1 parent 7dad23b
authored October 05, 2010
4  ldapconnect.py
@@ -96,3 +96,7 @@ def modrdn(l, dn, newrdn):
96 96
 def passwd(l, dn, oldpw, newpw):
97 97
     ldebug("Changing password for %s" % dn)
98 98
     l.passwd_s(dn, oldpw, newpw)
  99
+
  100
+@with_ldap_connection
  101
+def whoami(l):
  102
+    return l.whoami_s()
4  ldapobject.py
@@ -37,6 +37,10 @@ def tuple_to_dn(t):
37 37
                                ldap.dn.escape_dn_chars(val))
38 38
                     for (attr,val) in t)
39 39
 
  40
+def whoami():
  41
+    return lc.whoami()
  42
+
  43
+
40 44
 class LDAPClass(type):
41 45
     '''Classes which are mapped to LDAP. LDAPClass is used as a metaclass for
42 46
     LDAP-mapped classes. So, a class User might subclass LDAPObject and would

0 notes on commit e50daab

Please sign in to comment.
Something went wrong with that request. Please try again.