[Zope] Re: Disable 'Access contents information' permission

Maik Jablonski maik.jablonski@uni-bielefeld.de
Thu, 30 Jan 2003 20:06:40 +0100


Dragos Chirila wrote:
> I want to add a Folder , not to acquire 'Access contents information' 
> permission and to enable this only for 'Manager' Role
> .. and all this in Python.
>  
> any ideas ??

Next time you should mention, what do you have tried and where you're 
stuck... you have far more chances to get an answer this way.

Here's what you want:

####

id='testfolder'

# add folder
context.manage_addFolder(id)

# get folder object

folder = getattr(context,id)

# Set permission

folder.manage_permission('Access contents information', 
roles=['Manager'], acquire=0)

####

Cheers, Maik