[Zope-CMF] Extending FTI.isConstructionAllowed

Wichert Akkerman wichert at wiggy.net
Tue Jun 2 07:57:57 EDT 2009


Previously yuppie wrote:
> It's no hook for adding restrictions, but it's a hook for using 
> different implementations.
> 
> > and does not support portal types.
> 
> Do you mean "does not support per portal type hooks" or do you mean 
> "does not support filtering based on portal type name"?

The latter. zope.* has no concept of FTIs or portal types.

> A CMF specific precondition would look up type restrictions in the fti 
> of the container.
> 
> checkFactory and checkObject are quite similar to isConstructionAllowed. 
> I think we should reimplement this based on zope.container before we 
> start adding new features.

I looked at the code in zope.container and frankly it scared me. I found
the documentation and code hard to follow, and the usage of
sys._getframe() made me drop the idea of using it.

Wichert.

-- 
Wichert Akkerman <wichert at wiggy.net>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.


More information about the Zope-CMF mailing list