Removed TLS connection option
authorThierry Florac <thierry.florac@onf.fr>
Thu, 08 Nov 2018 15:25:19 +0100
changeset 39 148e16dfb86c
parent 38 0cde6357775d
child 40 864c3e02e890
Removed TLS connection option
src/pyams_ldap/interfaces/__init__.py
src/pyams_ldap/zmi/plugin.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)
--- 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