[Zope] You are not allowed to access 'a particular str' in this context

Gerhard Schmidt estartu at ze.tum.de
Thu Jan 24 10:56:56 EST 2008


Hi all,

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 at 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"

I can access all DateTime objects. Only the strings a not allowed.

There is no difference when getMessages return of the Original list and when I
 build a new list with copies of the PersistentMapping objects.

To get this working I have to create new Dictionary from the Persistent
Mappings add them to an normal List and return this list.

ret = []

for test in self.msglist :
    temptest = {}
    for (key,value) in test.items() :
        temptest[key] = value
    ret.append(temptest)
return ret

That's a real performance killer as the list is read quite frequently.

Any Idea how to fix this.


Gerhard
-- 
-------------------------------------------------
Gerhard Schmidt       | E-Mail: schmidt at ze.tum.de
TU-München	      |
WWW & Online Services |
Tel: 089/289-25270    |
Fax: 089/289-25257    | PGP-Publickey on request


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 542 bytes
Desc: OpenPGP digital signature
Url : http://mail.zope.org/pipermail/zope/attachments/20080124/80e6e336/signature.bin


More information about the Zope mailing list