[Zope] Nested PersistentMappings and security

Pascal Peregrina Pperegrina at Lastminute.com
Mon Mar 7 06:47:55 EST 2005


Hi,

Here is my problem : I have a Zope object that defines a PersistentMapping
attribute.
The PersistentMapping can also have PersistentMapping values for some keys.

I mean :
MyObject
MyObject.containers is a PersistentMapping
And MyObject.containers[somekey] can also be a PersistentMapping

In a management ZPT of MyObject, I try to loop on the MyObject.containers
keys to display key/value pairs.

I get :
...
Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
__traceback_info__: container_data['description'] 
Module Python expression "container_data['description']", line 1, in
<expression> 
Module AccessControl.ZopeGuards, line 71, in guarded_getitem 
Unauthorized: You are not allowed to access 'description' in this context 
(container_data is the value - a PersistentMapping - of one of the
MyObject.containers keys)

My questions are : 
+ how can I remove Security checking on all MyObject.containers values ?
+ is there a better type of object to use instead of nesting
PersistentMappings ?

Thanks.

Pascal


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



More information about the Zope mailing list