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:
commit
bb7f36fc59
6 changed files with 57 additions and 38 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue