[Zope-dev] Re: Problems with non-zope object attribute access

Max M maxm at mxm.dk
Fri Mar 11 05:14:54 EST 2005


Dario Lopez-Kästen wrote:

> but I still get
> 
> """ The container has no security assertions. Access to 'lname' of 
> (Products.pdbapi.person.Person instance at 0x03449DA0) denied. """
> 
> errors when I try to access the attributes of a person object in the list.

What about wrapping them with something like?

class AccessWrapper:

     __allow_access_to_unprotected_subobjects = 1

     def __init__(self, obj):
         self._obj = obj

     def __getattr__(self, attr):
         return getattr(self._obj)

-- 

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science



More information about the Zope-Dev mailing list