[Zope-CMF] fine grained permissions for adding objects

Dieter Maurer dieter@handshake.de
Sun, 30 Jun 2002 23:48:32 +0200


Jens Wolk writes:
 > How do I set different permissions for the creation of two different kinds of 
 > objects from the same python based CMF product?
 > ....
 > The best way to get this behavior, I thought, is to create an new permission 
 > 'Add MemberContent' and to give Members this permission while Managers have 
 > the standard 'Add portal content' and 'Add MemberContent' permission.
 > 
 > However, in the call to utils.ContentInit in __init.py__ for a product, I can 
 > pass only one Permission for all classes. Therefore, I do this twice, but 
 > this seems to confuse the portal_types tool: when I try to add a new type 
 > under "Contents" of the portal_type tool (through the ZMI) and select 
 > Factory-based Type information only those objects which I are passed in the 
 > second call to utils.ContentInit are listed. 
Maybe, you can use different names for the different permission
classes.

It least, I can do it successfully in this way.


Dieter