[Zope] security with dtml-in next-batches variable

Randall F. Kern randy@spoke.net
Mon, 23 Apr 2001 11:44:57 -0700


Why doesn't this work:

<dtml-in expr=3D"_.range(100)" size=3D"10">
    <dtml-if next-batches>
        <dtml-var expr=3D"_['next-batches'][-1]['batch-start-index']">
    </dtml-if>
</dtml-in>

(it results in Unauthorized, from line 168 in ZopeSecurityPolicy)

However, I can dtml-in over next-batches:

<dtml-in expr=3D"_.range(100)" size=3D"10">
    <dtml-if sequence-end>
        <dtml-in next-batches mapping>
            <dtml-var batch-start-index>
        </dtml-in>
    </dtml-if>
</dtml-in>

(this works fine, but will be needlessly slower than just <dtml-var>ing
the correct value.)

Thanks,
-Randy