On Wed, 29 Nov 2000, Randall Kern wrote:

> By "use local roles", you mean do it manually, through the web ui?  I don't
> see how I could create a local role from code either, since none of my
> objects have been created yet.

You can do it in the manage_afterAdd() method of your class:

def manage_afterAdd(self, item, container) :
        # create the role only if it doesn't exist (acquisition)
        if "yourrole" not in container.valid_roles() :

        # here you may need to call the manage_afetrAdd() method
        # of you base class
        # e.g.: Folder.manage_afterAdd(self, item, container)

So the role will be created in your instance during its creation, but only
if doesn't exist yet (or can't be acquired from the above level).

hoping this will help.

Jerome Alet

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to