[Zope-CMF] Re: Registering content types with different add permissions in one module

Raphael Ritz ritz at itb.biologie.hu-berlin.de
Fri Nov 7 04:35:32 EST 2003



Gerry Kirk wrote:
> Dieter Maurer wrote:
> 
>> We use separate "ContentInit" for the sets that require
>> different permissions, e.g.:
>>
>>     utils.ContentInit( 'WebCMS Inhalte'
>>                      , content_types=WebCMSClasses
>>                      , permission=EditHaufeContent
>>                      , extra_constructors=WebCMSConstructors
>>                      , fti=Portal.factory_type_information
>>                      ).initialize( context )
>>
>>     utils.ContentInit( 'Member Inhalte'
>>                      , content_types=MemberContentClasses
>>                      , permission=AddPortalContent
>>                      , extra_constructors=MemberContentConstructors
>>                      , fti=Portal.factory_type_information
>>                      ).initialize( context )
>>
>> Someone reported that there are restriction for this approach.
>> When I remember right (--> mailing list archives, to be sure),
>> then the "fti" must be identical as otherwise the last "fti" wins.
>>
>> Dieter
>>
> 
> Using the approach above, one would have to use a different approach 
> than just calling process_types as below. At the very least, build 
> separate lists from the big list
> 
> content_types, constructors, ftis = process_types(
>         listTypes(PROJECTNAME),
>         PROJECTNAME)
> 
> I'm confused about the reference to using the same fti. Doesn't each 
> type have its own fti? How can I use only one? In my code above, would I 
> pass in the variable ftis? Need some more clarification.
> 
My (limited) understanding of this is that for reasons that I have
not looked into, 'ContentInit' needs ALL ftis from the product on
every single call, otherwise only the last call will be effective.
My guess is that the ftis are always overwritten.

Raphael

> Thanks,
> Gerry
> 
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF at zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
> 
> See http://collector.zope.org/CMF for bug reports and feature requests
> 





More information about the Zope-CMF mailing list