[Zope-dev] title_or_id permissions on Files

Brian R Brinegar brinegar@ecn.purdue.edu
Wed, 8 Jan 2003 15:27:35 -0500 (EST)


Hello,

I have a folder full of files. One of these files has the "View"
permission removed from all roles so that no one can view this file.

I also have a python script which lists the files in the folder like this:

for file in context.objectValues('File'):
  print file.title_or_id()

This code fails when it tries to access the title_or_id method of the file
with the "View" permission removed. However, if I change the python script
to something like this:

for file in context.objectValues('File'):
  print file.getProperty('title', file.getId())

Everything works. I believe that the restricting permission for the
title_or_id method should be "Access Contents Information" not "View".
However I am not sure where the title_or_id method of File is defined.

Should I submit this as a bug? This has caused me trouble in the past and
it seems like the second python example should not have to be used since
the title_or_id method exists.

Thanks,
-Brian Brinegar
 ECN Web Systems Developer