[Zope] Adding roles in Product code
Bernd Dorn
zope-mailinglist@mopa.at
Wed, 25 Jun 2003 14:17:40 +0200
drew nichols wrote:
> How can i add a role automatically when creating my new instance of my
> class that extends ObjectManager??
>
> REQUEST.set ( 'role', 'Void' )
> self.manage_defined_roles ( "Add Role", REQUEST )
>
> This throws a *get* error so i assume that the
> REQUEST.RESPONSE.redirect returned from the manage_defined_roles won't
> work from my python code.
>
> Drew
>
>
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
dunno if i understood you right
but i think you just have to set the following class variable in your class
__ac_roles__ = ("some role",)
every instance than provides the role
cheers, bernd