[Zope-CMF] Re: Allowed content types (CMF 1.5 - Roadmap)

Christian Heimes heimes at faho.rwth-aachen.de
Mon Mar 15 11:50:15 EST 2004


Andrew Veitch wrote:
> Yes, I certainly saw this as an Archetypes issue rather than a CMF issue.
> It's a little bit tricky to get Archetypes to give you a separate add
> permission for each content type, making that easy is probably the way to
> go.

Yes it's a little bit tricky but after about 2-3h frustrating 
code-digging and testing different ideas I got the solution:

* The ftis and the product name must be the same for every type so I 
used the fti from process_types().

* The constructor and the class must differ for each security setting.

See 
http://cvs.sourceforge.net/viewcvs.py/collective/ATContentTypes/__init__.py?rev=1.1.1.1&view=auto 
for an example.

Christian





More information about the Zope-CMF mailing list