Gerhard Schmidt wrote at 2008-1-24 16:56 +0100:
I have a rather strange Problem.
I have a PersistentList containing PersistentMapping objects.
[{'Status': 'Read', 'Confirm': False, 'Read': DateTime('2008/01/24 16:03:32.508 GMT+1'), 'Expires': None, 'SenderID': 'DC83D1F1DB88CDE8', 'Date': DateTime('2008/01/24 15:51:50.998 GMT+1'), 'Message': 'Da ist ein permission test', 'ID': '20080124155150_4641@DC83D1F1DB88CDE8'}]
When do a tal:repeat="message here/getMessages" and a tal:replace="message" everything functions as expected. When i try tal:replace="message/ID" I get an Unauthorized Exception "You are not allowed to access 'a particular str' in this context"
Reconfigure your "error_log" object to not ignore "Unauthorized" exceptions, reproduce the error and then look at the corresponding traceback. I expect that the "message" object implements a "__bobo_traverse__" method (or gets one through "Five"). Zope is a bit stupid when "__bobo_traverse__" returns an object without security declarations -- such as e.g. a string. In this case, it insists that "getattr" must return the same object and raise "Unauthorized" otherwise. -- Dieter