Show More
@@ -141,9 +141,9 b' class LdapSettingsSchema(AuthnPluginSett' | |||||
141 | colander.String(), |
|
141 | colander.String(), | |
142 | default='', |
|
142 | default='', | |
143 | description=_('LDAP Attribute to map to user name'), |
|
143 | description=_('LDAP Attribute to map to user name'), | |
144 | missing_msg=_('The LDAP Login attribute of the CN must be specified'), |
|
|||
145 | preparer=strip_whitespace, |
|
144 | preparer=strip_whitespace, | |
146 | title=_('Login Attribute'), |
|
145 | title=_('Login Attribute'), | |
|
146 | missing_msg=_('The LDAP Login attribute of the CN must be specified'), | |||
147 | widget='string') |
|
147 | widget='string') | |
148 | attr_firstname = colander.SchemaNode( |
|
148 | attr_firstname = colander.SchemaNode( | |
149 | colander.String(), |
|
149 | colander.String(), | |
@@ -186,6 +186,7 b' class AuthLdap(object):' | |||||
186 | if ldap == Missing: |
|
186 | if ldap == Missing: | |
187 | raise LdapImportError("Missing or incompatible ldap library") |
|
187 | raise LdapImportError("Missing or incompatible ldap library") | |
188 |
|
188 | |||
|
189 | self.debug = False | |||
189 | self.ldap_version = ldap_version |
|
190 | self.ldap_version = ldap_version | |
190 | self.ldap_server_type = 'ldap' |
|
191 | self.ldap_server_type = 'ldap' | |
191 |
|
192 | |||
@@ -213,6 +214,8 b' class AuthLdap(object):' | |||||
213 | self.LDAP_FILTER = safe_str(ldap_filter) |
|
214 | self.LDAP_FILTER = safe_str(ldap_filter) | |
214 |
|
215 | |||
215 | def _get_ldap_server(self): |
|
216 | def _get_ldap_server(self): | |
|
217 | if self.debug: | |||
|
218 | ldap.set_option(ldap.OPT_DEBUG_LEVEL, 255) | |||
216 | if hasattr(ldap, 'OPT_X_TLS_CACERTDIR'): |
|
219 | if hasattr(ldap, 'OPT_X_TLS_CACERTDIR'): | |
217 | ldap.set_option(ldap.OPT_X_TLS_CACERTDIR, |
|
220 | ldap.set_option(ldap.OPT_X_TLS_CACERTDIR, | |
218 | '/etc/openldap/cacerts') |
|
221 | '/etc/openldap/cacerts') |
General Comments 0
You need to be logged in to leave comments.
Login now