1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

Merge branch 'master' of git://gitorious.org/~clebail/radicale/ares-radicale

Conflicts:
	radicale/xmlutils.py
This commit is contained in:
System User 2011-02-17 10:42:02 +01:00
commit bb7f36fc59
6 changed files with 57 additions and 38 deletions

View file

@ -12,12 +12,15 @@ def has_right(owner, user, password):
if owner != user:
return False
try:
log.log(10, "Open LDAP server connexion")
l=ldap.open(LDAPSERVER, 389)
dn="%s%s,%s" % (LDAPPREPEND, user, LDAPAPPEND)
l.simple_bind_s(dn, password);
cn="%s%s,%s" % (LDAPPREPEND, user, LDAPAPPEND)
log.log(10, "LDAP bind with dn: %s" %(cn))
l.simple_bind_s(cn, password);
log.log(20, "LDAP bind Ok")
return True
except:
log.error(sys.exc_info()[0])
log.log(40, "LDAP bind error")
return False
LDAPSERVER = config.get("authLdap", "LDAPServer")