[Zope-CMF] New CMF tool has bogus __roles__

Dan L. Pierson dan@control.com
Fri, 01 Feb 2002 16:27:18 -0500


--On Friday, February 01, 2002 08:44:36 PM +0100 Dieter Maurer 
<dieter@handshake.de> wrote:

> Add a "security.declareObjectProtected(<your permission>)"
> to define the roles.

I tried that (actually "security.declareObjectPublic()" as an
extreme test case).  It generates a warning about conflicting
security attributes but no other changes.  This is strange
because the code that generates that warning appears to set
the new attribute.  Obviously it's being overriden elsewhere.

The only thing I've found that works is the following truely
horrible kludge to initialize in the products's __init__.py:

   # add after utils.ToolInit(...)
   setattr(PostingsTool, '__roles__', '('Anonymous', 'Manager',))