[z3-five] Templates in views and path expressions
Tres Seaver
tseaver at palladion.com
Mon May 7 17:24:03 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Aspeli wrote:
> Tres Seaver wrote:
>
>>>>> - The <require /> directive doesn't seem to work properly on simple
>>>>> properties
>>>> Your context object somehow has no acquisition wrapper, and therefore
>>>> cannot be verified by Zope's acquisition-based security policy.
>>> Strange; it derives from CMF's PortalFolder (and a few other things), so
>>> it should be acquisition-aware, and I'm invoking the view via normal
>>> traversal.
>>>
>>> What is telling you that there's no aq wrapper, specifically?
>> The check for 'aq_inContextOf' is failing; that method is defined in C
>> for acquisition wrappers. Could you be running into a case where the
>> context is actually tuple-ified to prevent wrapping it in the view? I
>> think that is an AT thing, but don't recall for sure.
>
> I don't think that has anything to do with AT, and in any case, my
> product doesn't use Archetypes.
>
> I put this in the template:
>
> <b tal:content="python:context.aq_chain" />
>
> It outputs:
>
> [<Project at /test/my-workspace>, <PloneSite at /test>, <Application at
> >, <ZPublisher.BaseRequest.RequestContainer object at 0x82945b0>]
Try this:
<b tal:content="python:context.aq_inner.aq_chain" />
For security purposes, only the "innermost" wrappers (the "true
containment") matter.
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGP0ST+gerLs4ltQ4RAouFAJ4iSu8pUCXstZAfgKTkQGBMoVIBgACfVgNu
h5KKwVIVqXOkdcTRVKsqNnY=
=DmPx
-----END PGP SIGNATURE-----
More information about the z3-five
mailing list