Re: [Zope] Cloning a ZClass-Instance
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. I know that cloning a catalogaware zclass it's not working but object-manager?? That's the complete traceback: ------> Traceback (innermost last): File C:\Zop\lib\python\ZPublisher\Publish.py, line 222, in publish_module File C:\Zop\lib\python\ZPublisher\Publish.py, line 187, in publish File C:\Zop\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: ElementWithAttributes) File C:\Zop\lib\python\ZPublisher\Publish.py, line 171, in publish File C:\Zop\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: NewsPruefer) File C:\Zop\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: NewsPruefer) File C:\Zop\lib\python\OFS\DTMLMethod.py, line 167, in __call__ (Object: NewsPruefer) File C:\Zop\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__ (Object: NewsPruefer) File C:\Zop\lib\python\DocumentTemplate\DT_In.py, line 607, in renderwob (Object: objectValues(['news'])) File C:\Zop\lib\python\DocumentTemplate\DT_Let.py, line 147, in render (Object: x="_.getitem('sequence-item')") File C:\Zop\lib\python\DocumentTemplate\DT_Util.py, line 337, in eval (Object: manage_clone(x,'versuch',REQUEST)) (Info: REQUEST) File <string>, line 0, in ? 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) Thanks again!
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
participants (2)
-
Dieter Maurer -
Sven Hohage