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

Roger ineichen dev at projekt01.ch
Thu Jul 8 17:27:39 EDT 2004


Stephan Richter wrote:
> On Wednesday 07 July 2004 16:28, Nicolas Évrard wrote:
> > This way I think SimplePrincipal might be used by any 
> principal source 
> > implementing IPrincipalSourceContainer.
> 
> But this is not as good as you might think, since you do not 
> want to be able 
> to have LDAPSimplePrincipals in BTreePrincipalContainers. 
> What you should od 
> instead is develop a base principal that can be used for all 
> the other 
> implementations.

Some questions about the principal source interfaces:

Why does the IPrincipalSource not inherit from IContained?
Is it possible to have IPrincipalSource outside a 
IPluggableAuthenticationService, because we don't have a

ContainerTypesConstraint for IPluggableAuthenticationService
like:
    __parent__= Field(
        constraint =
ContainerTypesConstraint(IPluggableAuthenticationService))

And why we don't have read methods of the container in this interface?
Or at least the methods __len__(), keys(), values()

This way we can't get the size of the source or useable infos out
of the principal source. Just authenticate. 

----
See, the IContainerPrincipalSource is inherited from IContained
but not the IPrincipalSource.

class IContainerPrincipalSource(IPrincipalSource, IContained):
    """This is a marker interface for specifying principal sources that are
    also containers. """

    __parent__= Field(
        constraint =
ContainerTypesConstraint(IPluggableAuthenticationService))
-----

Regards Roger

> Regards,
> Stephan
> -- 
> Stephan Richter
> CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. 
> student) Web2k - Web Software Design, Development and 
> Training _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub: 
> http://mail.zope.org/mailman/options/zope3-> dev/dev%40projekt01.ch
> 
> 



More information about the Zope3-dev mailing list