[Zope-CVS] SVN: ldapadapter/trunk/ Removed unused baseDN -- we
don't need it at this low level
Florent Guillaume
fg at nuxeo.com
Sun Oct 10 11:31:25 EDT 2004
Log message for revision 27918:
Removed unused baseDN -- we don't need it at this low level
Changed:
U ldapadapter/trunk/interfaces.py
U ldapadapter/trunk/utility.py
-=-
Modified: ldapadapter/trunk/interfaces.py
===================================================================
--- ldapadapter/trunk/interfaces.py 2004-10-10 15:24:41 UTC (rev 27917)
+++ ldapadapter/trunk/interfaces.py 2004-10-10 15:31:25 UTC (rev 27918)
@@ -39,9 +39,9 @@
default=389,
required=True,
)
- baseDN = TextLine(
- title=_("Base DN"),
- default=u'',
+ useSSL = Bool(
+ title=_("Use SSL"),
+ default=False,
)
bindDN = TextLine(
title=_("Bind DN"),
@@ -51,10 +51,6 @@
title=_("Bind password"),
default=u'',
)
- useSSL = Bool(
- title=_("Use SSL"),
- default=False,
- )
def connect(dn, password=None):
"""Connect to the server.
@@ -63,16 +59,6 @@
"""
class ILDAPAdapterManagement(Interface):
- #serverURL = TextLine(
- # title=_("Server URL"),
- # description=_(
- # "Specify the LDAP URL of the server. Examples:\n"
- # "\n"
- # "ldap:///\n",
- # "ldaps://localhost:389/\n",
- # ),
- # default=u"ldap://localhost",
- # )
serverURL = LDAPURI(
title=_("Server URL"),
description=_(
@@ -83,10 +69,6 @@
),
default="ldap://localhost",
)
- baseDN = TextLine(
- title=_("Base DN"),
- default=u'',
- )
bindDN = TextLine(
title=_("Bind DN"),
default=u'',
@@ -150,8 +132,10 @@
"""A test adapter for to test the connection between Zope and LDAP."""
def testConnection():
- """Returns a report about connecting the LDAP server.
-
+ """Test the LDAP connection.
+
+ Returns a report about connecting the LDAP server.
+
Each step of connecting the server is reported as a string
in a report (list).
"""
Modified: ldapadapter/trunk/utility.py
===================================================================
--- ldapadapter/trunk/utility.py 2004-10-10 15:24:41 UTC (rev 27917)
+++ ldapadapter/trunk/utility.py 2004-10-10 15:31:25 UTC (rev 27918)
@@ -54,13 +54,13 @@
class LDAPAdapter(object):
implements(ILDAPAdapter)
- def __init__(self, host='localhost', port=389, baseDN='', bindDN='', bindPassword='', useSSL=False):
+ def __init__(self, host='localhost', port=389, useSSL=False,
+ bindDN='', bindPassword=''):
self.host = host
self.port = port
- self.baseDN = baseDN
+ self.useSSL = useSSL
self.bindDN = bindDN
self.bindPassword = bindPassword
- self.useSSL = useSSL
def connect(self, dn=None, password=None):
proto = self.useSSL and 'ldaps' or 'ldap'
@@ -80,9 +80,6 @@
password = self.bindPassword
conn.simple_bind_s(dn, password)
# May raise INVALID_CREDENTIALS, SERVER_DOWN, ...
-
- # set baseDN to the wrapper class
- conn.baseDN = self.baseDN
return LDAPConnection(conn)
@@ -123,7 +120,6 @@
def __init__(self, conn):
self.conn = conn
- self.baseDN = None
def add(self, dn, entry):
attrs_list = []
More information about the Zope-CVS
mailing list