Hi, After upgrading from Zope-2.6.4 to Zope-2.7.3 i get the following error when i try to add an object from the add-list in zmi: Unauthorized: You are not allowed to access '<property-name>' in this context (Also, an error occurred while attempting to render the standard error message.) The property belongs to the container-object, where i try to add the new instance, and is called via "dtml-var" in the constructor-method, which is a dmtlmethod, of the ZClass. When i try to access that property in the constructor-method with this().<property> or restrictedTraverse('<property>') it works fine. Same behaviour with Zope-2.7.4. At the moment i'am running out of ideas. I changed some permissions but that doesn't work. At the moment i'am not shure if that behaviour is a bug or a feature? Any ideas? regards ralph
From: "Arenz, Ralph" <Ralph.Arenz@friatec.de>
After upgrading from Zope-2.6.4 to Zope-2.7.3 i get the following error when i try to add an object from the add-list in zmi:
Unauthorized: You are not allowed to access '<property-name>' in this context (Also, an error occurred while attempting to render the standard error message.)
The property belongs to the container-object, where i try to add the new instance, and is called via "dtml-var" in the constructor-method, which is a dmtlmethod, of the ZClass. When i try to access that property in the constructor-method with this().<property> or restrictedTraverse('<property>') it works fine. Same behaviour with Zope-2.7.4. At the moment i'am running out of ideas. I changed some permissions but that doesn't work. At the moment i'am not shure if that behaviour is a bug or a feature?
You need to make sure that the security setting for the 'container-object' matches the proxy setting of the dtml method that is adding/modifying the property field. eg. if you have a folder, set the security setting for 'Manage Properties' to 'Authenticated' (for example) then set the proxy role for the dtml method that will add/modify properties to 'Authenticated' Note: you can also set security when a user logs in (google for more on this or read the zope book) Jonathan
On Mar 9, 2005, at 13:20, Arenz, Ralph wrote:
Hi,
After upgrading from Zope-2.6.4 to Zope-2.7.3 i get the following error when i try to add an object from the add-list in zmi:
Unauthorized: You are not allowed to access '<property-name>' in this context (Also, an error occurred while attempting to render the standard error message.)
Try your software on the current CVS Zope-2_7-branch and see if that solves the problem. Some overeager security checks were fixed after 2.7.4. jens
participants (3)
-
Arenz, Ralph -
Jens Vagelpohl -
Jonathan Hobbs