[Zope] acquisition

Arenz, Ralph Ralph.Arenz at friatec.de
Wed Mar 9 08:18:38 EST 2005



-----Ursprüngliche Nachricht-----
Von: Jonathan Hobbs [mailto:toolkit at magma.ca]
Gesendet: Mittwoch, 9. März 2005 13:43
An: Arenz, Ralph; zope at zope.org
Betreff: Re: [Zope] acquisition


From: "Arenz, Ralph" <Ralph.Arenz at 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)

I won't add or modify that property, i only wan't to display it in the 
constructor-method with "dmtl-var". Notice that everything works fine under
Zope-2.6.4!

ralph


Jonathan



More information about the Zope mailing list