[Zope-CMF] Accessing subobjects

Tres Seaver tseaver@zope.com
02 Oct 2002 11:51:25 -0400


On Wed, 2002-10-02 at 04:01, Andreas Jung wrote:
> An instance of a CMF class has a method getAllProperties() that returns
> a list of instances of a Python class XX. Inside a ZPT I want to call
> 
> <tr tal:repeat="prop here/getAllProperties">
>  <th tal:content="prop/getDescription">...</th>
> </tr>
> 
> where getDescription() is a method of the class XX. This fails with
> "you are not allowed to access getDescription in this context" although
> __allow_access_to_unprotected_subobjects__ is set to 1.
> 
> Am I missing something or this there a workaround for the problem?

I'm guessing the 'getAllProperties' needs to wrap the items before
returning them;  the security machinery doesn't function properly with
unwrapped sub-objects.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com