[Zope] Zope 2.6.4: can't iterate through protected objects
Dieter Maurer
dieter at handshake.de
Sun Mar 14 15:25:44 EST 2004
Kyler Laird wrote at 2004-3-13 08:39 -0500:
>[ http://mail.zope.org/pipermail/zope/2004-March/147995.html ]
>
>Bakhtiar A Hamid wrote:
>> there were some major security changes in zope starting zope2.63 and the
>> beta3(?) of zope 2.7.0
>
>Ug. I'm all for better security models but this one seems like it has
>no benefit.
>
>I decided to install a test instance of 2.7.0 to discover if this
>behavior continues. (I haven't done a manual install for a loooong
>time. It's gotten *much* easier.) It does.
>
>Instead of doing something obvious like this,
> for object in container.objectValues():
> try:
> print object.title
> except:
> continue
>I apparently have to use a kludge like this.
> for object_id in container.objectIds():
> try:
> object = container[object_id]
> except:
> continue
> print object.title
Some of "ZTUtils" batch support may help you.
You would not restrict batch size but filter on "Unauthorized".
--
Dieter
More information about the Zope
mailing list