[Zope] Cloning a ZClass-Instance

Dieter Maurer dieter@handshake.de
Thu, 9 Nov 2000 20:35:59 +0100 (CET)


Sven Hohage writes:
 > Once again thanks to you, but I can't figure out why cloning it's not
 > possible.
 > The object is a simple zclass with the baseclasses ->ZObject,
 > ZObjectManager<-
 > Nothing special.
 > ....
 > That's the complete traceback:
 > 
 > 
 > ------>
 > Traceback (innermost last):
 > ....
 >   File C:\Zop\lib\python\OFS\CopySupport.py, line 321, in manage_clone
 >     (Object: holle)
 >   File C:\Zop\lib\python\OFS\CopySupport.py, line 402, in
 > _verifyObjectPaste
 >     (Object: holle)
 > Copy Error: (see above)
Your traceback indicates, that the object itself does not object
to be copied. It's the destination that does not want the
object.

  The problem occurs in "_verifyObjectPaste".
  Its source comment says:

        # Verify whether the current user is allowed to paste the
        # passed object into self. This is determined by checking
        # to see if the user could create a new object of the same
        # meta_type of the object passed in and checking that the
        # user actually is allowed to access the passed in object
        # in its existing context.

Thus, it is probably a security issue:

  Either you are not allowed to call the ZClass constructor
  at the destination,

  or you are not allowed to access the object to be cloned
  at the destination.


Dieter