Permalink
Browse files

support for ldap whoami() operation

  • Loading branch information...
1 parent 7dad23b commit e50daab5837583ea19111edf4ad0a69ce0a8104d Root committed Oct 5, 2010
Showing with 8 additions and 0 deletions.
  1. +4 −0 ldapconnect.py
  2. +4 −0 ldapobject.py
View
@@ -96,3 +96,7 @@ def modrdn(l, dn, newrdn):
def passwd(l, dn, oldpw, newpw):
ldebug("Changing password for %s" % dn)
l.passwd_s(dn, oldpw, newpw)
+
+@with_ldap_connection
+def whoami(l):
+ return l.whoami_s()
View
@@ -37,6 +37,10 @@ def tuple_to_dn(t):
ldap.dn.escape_dn_chars(val))
for (attr,val) in t)
+def whoami():
+ return lc.whoami()
+
+
class LDAPClass(type):
'''Classes which are mapped to LDAP. LDAPClass is used as a metaclass for
LDAP-mapped classes. So, a class User might subclass LDAPObject and would

0 comments on commit e50daab

Please sign in to comment.