[Zope-CMF] content type permissions

Mark McEahern mark@mceahern.com
Tue, 15 Oct 2002 15:17:32 -0500


I have a fairly simple Zope Product for a portal type called Press Release.
Based on this thread:

  http://lists.zope.org/pipermail/zope-cmf/2002-August/014958.html

in the __init__.py, I have:

# start snip
def initialize(context):

    meta_type = PressRelease.PressRelease.meta_type
    utils.initializeBasesPhase2(z_bases, context)
    utils.ContentInit(meta_type,
                      content_types=contentClasses,
                      permission=PressReleasePermissions.AddPressRelease,
                      extra_constructors=contentConstructors,
                      fti=PressRelease.factory_type_information,
                      ).initialize(context)
# end snip

That is, I'm trying to restrict the ability to add this type to the
permission AddPressRelease.

However, when I join the portal (i.e., become a Member), click My Stuff, and
then click New, I see Press Release among the list of portal types I can
add.  I have not granted the AddPressRelease permission to the role this
user belongs to, so how come it can "see" the PressRelease type as a type to
add?

Thanks,

// mark

p.s.  I'm using Zope 2.6b2 and CMF 1.3 final.

-