[Zope-CMF] Registering content types with different add permissions
in one module
Heimo Laukkanen
huima at iki.fi
Tue Oct 21 08:51:23 EDT 2003
Hi ya,
I need to register new types into Portal, but would need different add
permissions for different types. I have all my content types created
with Archetypes in content.py, which is in MyProject directory.
How can I register some of these types with one permission and rest of
them with another? I tried to do second ContentInit.initialize call with
just a few of the types - but it wiped out types that I registered
beforehand.
There must be some solution?
def initialize(context):
import content
content_types, constructors, ftis = process_types(
listTypes(PROJECTNAME),
PROJECTNAME)
utils.ContentInit(
PROJECTNAME + ' Content',
content_types = content_types,
permission = ADD_CONTENT_PERMISSION,
extra_constructors = constructors,
fti = ftis,
).initialize(context)
-huima
More information about the Zope-CMF
mailing list