[Zope] manage_clone problem, python script solution

Nicolas LAURANCE nicolas.laurance at wanadoo.fr
Thu Aug 28 22:44:22 EDT 2003



-----Message d'origine-----
De : Dieter Maurer [mailto:dieter at handshake.de]
Envoye : jeudi 28 aout 2003 20:50
A : Webmaster Expert RH
Cc : zope at zope.org
Objet : Re: [Zope] manage_clone problem, python script solution required
please


Webmaster Expert RH wrote at 2003-8-27 12:17 +0200:
 > ...
 > It works perfectly well for me when I'm logged in as manager, but my
users
 > get an error (prompted for password again)
 >
 > In the zope log I get :
 > Module OFS.CopySupport, line 268, in manage_clone
 > Module OFS.CopySupport, line 349, in _verifyObjectPaste
 > Unauthorized: <zExceptions.unauthorized.Unauthorized instance at
0x8e83bec>
 >
 > It seems (thank you Dieter) that this is a know bug

It only gets a bug when your script has proxy roles which
would allow it to create the new object in the target.

The bug is: proxy roles are not considered in the authorization
check.

alas, is there a bug tracking report for this ?

 > In searching the archives I found a solution with external method.
 > Unfortunately, my configuration doesn't allow me to use those easily. I
must
 > find a workaround in python_script only.

You may be able to relax the object creation permissions
in the target folder (that would be the easiest solution).

If this is not an option, then you may clone the object
yourself: create a new instance and transfer all relevant
data. Of course, this is highly type specific.
It is feasible only for a small number of relative easy types.
You will need to give your script a proxy role such
that it is able to create the objects in the target.

I haven't build a specific permission for my first full python product :(
As I don't have an easy access to my production code , I went for this
solution.

 > Of course I have set the proxy role of the script to 'Manager'

danke schon once again Dieter :)






More information about the Zope mailing list