[Zope-CMF] Setting another permission for adding a specific object to portal
Dieter Maurer
dieter@handshake.de
Mon, 21 Jan 2002 22:08:46 +0100
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)".
It's on my to do list to analyse this further...
A work around may be to use a non-factory based type.
They are protected by the construction object in the normal
way.
Dieter