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.

----- Original Message -----
From: "Chris McDonough" <[EMAIL PROTECTED]>
Sent: Wednesday, November 29, 2000 7:09 PM
Subject: Re: [Zope] adding roles to Zope in Product.initialize()

> No... the stock answer is "use local roles".  I had a proposal up to
> an interface for programmatically adding roles on but it's
> quite dead.  The thought behind this is that actual roles are reserved for
> administrator usage, not developer usage.  Which leaves us in sort of this
> weird state that I'm not completely comfortable with, but don't have time
> argue. :-)
> ----- Original Message -----
> From: Randall Kern
> Sent: Wednesday, November 29, 2000 9:12 PM
> Subject: [Zope] adding roles to Zope in Product.initialize()
> I wish to restrict the creation of a class (SpokeSite) to people with the
> "Add Spoke Site" permission, and in turn only provide that permission to
> people in the 'Super-manager' Role.
> When I call ProductContext.registerClass for my SpokeSite class, I can
> the permission argument with the tuple ('Add Spoke Site',
> which does a good job of limiting the availability of my class (just as I
> desire).
> However, I would like my Product to automatically create the
> Role, if it doesn't exists.  The bad part is that this role needs to be
> added before any of my objects exist, which makes it hard...
> I've got it *working* by cheating, and using the private __app attribute
> the ProductContext.  Is there a better way for python Products to alter
> Zope installation (add Roles, create Folders, etc.) during installation?
> Thanks!
> -Randy

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to