[Zope] Adding Role Programmatically
Samir Mishra
SamirMishra@cbuae.gov.ae
Mon, 17 Feb 2003 09:49:42 +0400
Hello all,
This is probably simple, but I'm unable to find anything on it.
I'm trying to add a new role to a new folder using a Python script, and am
using -
context.manage_addFolder(fldr, folders[fldr], 1, 1) # folders is a
dictionary
# create a new folder named 'fldr'
newFolder = getattr(context, fldr)
# create reviewer role in folder
newFolder.manage_addRole('Reviewer')
The last line generates the following error -
Line 20: "_addRole" is an invalid attribute name because it starts with "_".
I've looked at the source code in Roles.py but can't find an alternative.
What should I be doing here? Is there any documentation on this (I can't
find anything in the Zope Book either).
TIA
Samir