[Zope] How to give caller acquisition path to an object through python script ?

Michel Pelletier michel@digicool.com
Thu, 31 May 2001 16:25:42 -0700 (PDT)


On Thu, 31 May 2001, Casey Duncan wrote:

> DTML methods do this, DTML documents do not. Think "Containment before
> context" as a mantra. The only way to make a DTML Document act like it
> is contained in a different container would be to use an external method
> like so that rewrapped the document:
> 
> def rewrap(DTMLdoc, folder):
> 	"""Returns a document in the context of another folder"""
> 	return DTMLdoc.aq_base.__of__(folder)
> 
> I am not sure I would recommend this approach, however, as it goes
> against the original DTML document design. 

And it may also open a security hole by giving DTML programers the ability
to wrap an object in a more permissive context, but I'm not sure, that
just came to my mind.

I wouldn't recommend it either. ;)

-Michel