[Zope3-dev] Propose interface change (well not really)

Jim Fulton jim at zope.com
Thu Jul 8 18:23:27 EDT 2004


Nicolas Évrard wrote:
> Hello,
> 
> While developping on ldapauth, we (Roger Ineichen and me) had some
> problems with some part of the pluggable authentication as it is now.
> 
> I understand from the README.txt in the pluggableauth directory that
> this service is still under development.

Sort of.  I'm happy with the general simple framework.

I'm not to happy with the BTree user source implementation.

In fact, I'd be happy to see an alternative implementation.

Some things I'd like to see:

   - code moved out of __init__.py

   - BTreeUser source in a separate module from the pluggable auth service


> The fact is that the SimplePrincipal in this service is implementing the
> following interfaces:
> 
>    - IUserSchemafied
> 
>    - IBTreePrincipalSourceContained
>
> I feel this make too strong assertion about what is a SimplePrincipal.

Note that these interfaces are very specific to the implementation
of BTreePrincipalSource.

There are many things I don't like about BTreePincipalSource, one of which is
that passwords are stored on principals.  I hate IUserSchemafied. It
seems to exist mainly to make forms work.

> So here is my porposition : making SimplePrincipal implementing
> IPrincipalSourceContained this interface being a marker interface to
> specify that the __parent__ must implement IPrincipalSourceContainer.

This is fine.

> This way I think SimplePrincipal might be used by any principal source
> implementing IPrincipalSourceContainer.

You mean IContainerPrincipalSource.

I think this is fine.

Jim


-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list