[Zope] acquisition

Jonathan Hobbs toolkit at magma.ca
Wed Mar 9 07:43:24 EST 2005


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)


Jonathan




More information about the Zope mailing list