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

Gerry Kirk gerry at faithonline.com
Thu Nov 6 16:57:40 EST 2003


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.

Thanks,
Gerry




More information about the Zope-CMF mailing list