[Zope3-dev] LDAP Authentication Adapter inside Zope 3 core
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed May 18 11:52:25 EDT 2005
Hello everyone,
I am going to fix the LDAP authentication adapter for PAU. Florent, Dylan and
Roger have all expressed interest to put the module into the Zope 3 source
tree, like ``Zope3/src/ldapauth`` (note the name change to a more neutral
one). The problem with that is, of course, that this authentication package
requires the ``ldap`` module, which does not ship with the standard Python.
Thus Zope 3 would not start up and tests would fail, if someone does not have
``ldap`` installed.
However, in light of recent developments I think we can overcome the problem.
(1) Tests
We only run the ``ldap``-specific tests when the module is installed. The
pattern to do this is well-established and should be no problem.
(2) ZCML
We only want to load the configuration, when the ``ldap`` package is
installed. Unfortunately, the ZCML-condition verb "have" is insufficient,
since the ``ldap`` package does not come with a ZCML file that defines a
feature. I thus propose to implement a second verb called "have-package" or
"have-module" that will check whether a particular module is importable. For
example::
<configure
zcml:condition="have-package ldap"> ...
I am open to alternative solutions. For example, we could also have a special
"have" verb case where the feature "package" is specially treated:
``have package ldap``
Thoughts? Comments?
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list