Mercurial > moin > 1.9
changeset 2977:6fdae05f0eeb
ldap auth: set attribute names' default to None (port from 1.6)
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Sat, 05 Jan 2008 22:05:54 +0100 |
parents | 9314cf657f07 |
children | b2546fd98514 |
files | MoinMoin/auth/ldap_login.py MoinMoin/config/multiconfig.py |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/auth/ldap_login.py Sat Jan 05 21:59:47 2008 +0100 +++ b/MoinMoin/auth/ldap_login.py Sat Jan 05 22:05:54 2008 +0100 @@ -79,7 +79,7 @@ 'ldap_aliasname_attribute', 'ldap_surname_attribute', 'ldap_givenname_attribute', - ] if (hasattr(cfg, attr) and getattr(cfg, attr) is not None)] + ] if getattr(cfg, attr) is not None] lusers = l.search_st(cfg.ldap_base, cfg.ldap_scope, filterstr.encode(coding), attrlist=attrs, timeout=cfg.ldap_timeout) # we remove entries with dn == None to get the real result list:
--- a/MoinMoin/config/multiconfig.py Sat Jan 05 21:59:47 2008 +0100 +++ b/MoinMoin/config/multiconfig.py Sat Jan 05 22:05:54 2008 +0100 @@ -358,10 +358,11 @@ # "(&(cn=%(username)s)(memberOf=CN=WikiUsers,OU=Groups,DC=example,DC=org))" # some attribute names we use to extract information from LDAP: - ldap_givenname_attribute = 'givenName' # ldap attribute we get the first name from - ldap_surname_attribute = 'sn' # ldap attribute we get the family name from - ldap_aliasname_attribute = 'displayName' # ldap attribute we get the aliasname from - ldap_email_attribute = 'mail' # ldap attribute we get the email address from + ldap_givenname_attribute = None # ('givenName') ldap attribute we get the first name from + ldap_surname_attribute = None # ('sn') ldap attribute we get the family name from + ldap_aliasname_attribute = None # ('displayName') ldap attribute we get the aliasname from + ldap_email_attribute = None # ('mail') ldap attribute we get the email address from + ldap_coding = 'utf-8' # coding used for ldap queries and result values ldap_timeout = 10 # how long we wait for the ldap server [s] ldap_verbose = True # if True, put lots of LDAP debug info into the log