[Zope-CVS] SVN: ldappas/trunk/interfaces.py Use a vocabulary choice for the LDAP adapter.

Florent Guillaume fg at nuxeo.com
Wed Oct 13 11:08:51 EDT 2004


Log message for revision 28097:
  Use a vocabulary choice for the LDAP adapter.
  

Changed:
  U   ldappas/trunk/interfaces.py

-=-
Modified: ldappas/trunk/interfaces.py
===================================================================
--- ldappas/trunk/interfaces.py	2004-10-13 15:06:42 UTC (rev 28096)
+++ ldappas/trunk/interfaces.py	2004-10-13 15:08:50 UTC (rev 28097)
@@ -19,37 +19,44 @@
 import re
 from zope.app.i18n import ZopeMessageIDFactory as _
 from zope.interface import Interface
+from zope.schema import Choice
 from zope.schema import TextLine
 
 class ILDAPAuthentication(Interface):
-    adapterName = TextLine(
-        title=_("LDAP Adapter"),
-        default=u'ldapadapter',
+    adapterName = Choice(
+        title=_(u"LDAP Adapter Name"),
+        description=_(u"The LDAP adapter name for the connection to be used."),
+        vocabulary="LDAP Adapter Names",
         required=True,
         )
     searchBase = TextLine(
         title=_("Search base"),
+        description=_(u"The LDAP search base where principals are found."),
         default=u'dc=example,dc=org',
         required=True,
         )
     searchScope = TextLine(
         title=_("Search scope"),
+        description=_(u"The LDAP search scope used to find principals."),
         default=u'sub',
         required=True,
         )
     loginAttribute = TextLine(
         title=_("Login attribute"),
+        description=_(u"The LDAP attribute used to find principals."),
         constraint=re.compile("[a-zA-Z][-a-zA-Z0-9]*$").match,
         default=u'uid',
         required=True,
         )
     principalIdPrefix = TextLine(
         title=_("Principal id prefix"),
+        description=_(u"The prefix to add to all principal ids."),
         default=u'ldap.',
         required=False,
         )
     idAttribute = TextLine(
         title=_("Id attribute"),
+        description=_(u"The LDAP attribute used to determine principal ids."),
         constraint=re.compile("[a-zA-Z][-a-zA-Z0-9]*$").match,
         default=u'uid',
         required=True,



More information about the Zope-CVS mailing list