[Zope-CMF] TypesTool and contruction permissions

yuppie y.2011 at wcm-solutions.de
Tue Jan 25 11:05:30 EST 2011


Godefroid Chapelle wrote:
> I always thought I could register two portal types based on the same
> class with different add permissions.
>
> I read TypesTool code today. If I understand well, when using new style
> ZTK factories, construction permissions are looked up in meta_types
> registration.
>
> I came to the following conclusion :
>
> to register separate portal_types that share class implementation but
> have different contruction permissions, I need to register meta_types
> with separate permissions then use those meta_types in the FTIs to
> relate the permissions and the portal_types.
>
> Is this correct ?

I'm afraid you can use five:registerClass only once per class. The 
directive modifies the class. meta_type to class is a 1:1 relationship.

Cheers, Yuppie


More information about the Zope-CMF mailing list