# HG changeset patch # User Thierry Florac # Date 1541687119 -3600 # Node ID 148e16dfb86c7b951951712d530e2d87f40092c2 # Parent 0cde6357775dcc1adfa1dbfdcd03add23d52f9bf Removed TLS connection option diff -r 0cde6357775d -r 148e16dfb86c src/pyams_ldap/interfaces/__init__.py --- a/src/pyams_ldap/interfaces/__init__.py Mon Nov 05 16:34:09 2018 +0100 +++ b/src/pyams_ldap/interfaces/__init__.py Thu Nov 08 15:25:19 2018 +0100 @@ -12,18 +12,14 @@ __docformat__ = 'restructuredtext' - -# import standard library import re -from ldap3 import BASE, LEVEL, SUBTREE -# import interfaces -from pyams_security.interfaces import IAuthenticationPlugin, IDirectorySearchPlugin +from ldap3 import BASE, LEVEL, SUBTREE +from zope.interface import Attribute, Interface +from zope.schema import Bool, Choice, TextLine +from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary -# import packages -from zope.interface import Interface, Attribute -from zope.schema import TextLine, Bool, Int, Choice, Dict, List -from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm +from pyams_security.interfaces import IAuthenticationPlugin, IDirectorySearchPlugin from pyams_ldap import _ @@ -38,7 +34,6 @@ SEARCH_SCOPES_VOCABULARY = SimpleVocabulary([SimpleTerm(v, title=t) for v, t in SEARCH_SCOPES.items()]) - # # Group members query mode # @@ -49,7 +44,6 @@ GROUP_MEMBERS_QUERY_MODE_VOCABULARY = SimpleVocabulary([SimpleTerm(v, title=t) for v, t in GROUP_MEMBERS_QUERY_MODE.items()]) - # # Group mail mode # @@ -89,10 +83,6 @@ default="ldap://localhost:389", required=True) - use_tls = Bool(title=_("Use TLS?"), - required=True, - default=False) - bind_dn = TextLine(title=_("Bind DN"), description=_("DN used for LDAP bind; keep empty for anonymous"), required=False) diff -r 0cde6357775d -r 148e16dfb86c src/pyams_ldap/zmi/plugin.py --- a/src/pyams_ldap/zmi/plugin.py Mon Nov 05 16:34:09 2018 +0100 +++ b/src/pyams_ldap/zmi/plugin.py Thu Nov 08 15:25:19 2018 +0100 @@ -121,7 +121,7 @@ tab_label = _("Connection") legend = None - fields = field.Fields(ILDAPPlugin).select('server_uri', 'use_tls', 'bind_dn', 'bind_password') + fields = field.Fields(ILDAPPlugin).select('server_uri', 'bind_dn', 'bind_password') weight = 1 @@ -232,7 +232,7 @@ tab_label = _("Connection") legend = None - fields = field.Fields(ILDAPPlugin).select('server_uri', 'use_tls', 'bind_dn', 'bind_password') + fields = field.Fields(ILDAPPlugin).select('server_uri', 'bind_dn', 'bind_password') edit_permission = MANAGE_SECURITY_PERMISSION weight = 1