[Zope] You are not allowed to access 'a particular str' in this
context
Gerhard Schmidt
estartu at ze.tum.de
Fri Jan 25 06:04:18 EST 2008
Dieter Maurer schrieb:
> 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 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"
>
> 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.
Time 2008/01/25 12:01:53.125 GMT+1
User Name (User Id) DC83D1F1DB88CDE8 (DC83D1F1DB88CDE8)
Request URL http://devportal:6080/portal_communications/manage_messagequeue
Exception Type Unauthorized
Exception Value You are not allowed to access 'a particular str' in
this context
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.PageTemplates.PageTemplateFile, line 113, in _exec
Module Products.PageTemplates.PageTemplate, line 104, in pt_render
- <PageTemplateFile at
/TUM_Portal/portal_communications/manage_messagequeue>
Module TAL.TALInterpreter, line 238, in __call__
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 715, in do_condition
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 691, in do_loop_tal
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 455, in do_optTag_tal
Module TAL.TALInterpreter, line 437, in no_tag
Module TAL.TALInterpreter, line 281, in interpret
Module TAL.TALInterpreter, line 531, in do_insertText_tal
Module Products.PageTemplates.TALES, line 227, in evaluateText
Module Products.PageTemplates.TALES, line 221, in evaluate
- URL: manage_messagequeue
- Line 17, Column 9
- Expression: standard:'message/ID'
- Names:
{'container': <TUMCommunications at
/TUM_Portal/portal_communications>,
'context': <TUMCommunications at /TUM_Portal/portal_communications>,
'default': <Products.PageTemplates.TALES.Default instance at
0x807299dd0>,
'here': <TUMCommunications at /TUM_Portal/portal_communications>,
'loop': <Products.PageTemplates.TALES.SafeMapping object at
0x8129168c0>,
'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
0x80729a248>,
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.TALES.SafeMapping object at
0x8129168c0>,
'request': <HTTPRequest,
URL=http://devportal:6080/portal_communications/manage_messagequeue>,
'root': <Application at >,
'template': <PageTemplateFile at
/TUM_Portal/portal_communications/manage_messagequeue>,
'traverse_subpath': [],
'user': <LDAPUser 'DC83D1F1DB88CDE8'>}
Module Products.PageTemplates.Expressions, line 185, in __call__
Module Products.PageTemplates.Expressions, line 173, in _eval
Module Products.PageTemplates.Expressions, line 127, in _eval
- __traceback_info__: message
Module Products.PageTemplates.Expressions, line 338, in restrictedTraverse
- __traceback_info__: {'path': ['ID'], 'TraversalRequestNameStack': []}
Unauthorized: You are not allowed to access 'a particular str' in this
context
Regards
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 auf Anfrage
More information about the Zope
mailing list