[Zope-CMF] Setting another permission for adding a specific object to portal

Dieter Maurer dieter@handshake.de
Mon, 21 Jan 2002 23:38:21 +0100


Dieter Maurer writes:
 > Gitte Wange writes:
 >  > I have created a new portal type for my portal.
 >  > I want only Managers to be able to add these objects (of this type) so in the code I set ADD_CONTENT_PERMISSION = 'Manage portal' (instead of 'Add portal content')..
 >  > 
 >  > But this wasn't enough. Ordinary members can add these new objects.
 > I looked into this problem recently.
 > 
 > I have the impression that "factory based types" do not provide
 > a means to restrict creation of their instances. The chain
 > I found has been "allowedContentTypes" --> "is ConstructionAllowed" -->
 > "validate(portal,portal,factory_name,factory)".
The answer you got from someone else (regarding the "Owner" permission)
has been better than mine.

  The permission that controls the creation of the factory type controlled
  instances is given as "permission" in the "ContentInit".
  By default, "Owner" has this permission.
  Changing the permission and withdrawing it from "Owner" works for me.
  


Dieter