Garito wrote at 2006-11-10 15:00 +0100:
>> You may try to return a wrapper that behaves the same way
>> as the original object (by deriving from the respective type)
>> but has "__roles__ = None" as additional attribute (which declares
>> the object public).
>Can you point me to a simple example or similar? I'm not sure if I
>understand what you are telling me
Here is a wrapper for the "str" type:
__roles__ = None
Instead of returning "some_str" you would return "WrappedStr(some_str)".
The "__roles__ = None" tells the Zope security machinery that
the object is public.
"WrappedStr(some_str)" would almost behave like "some_str" (but
of course not completely).
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -