[Zope-CMF] Python: trying to copy files

Yuppie schubbe@web.de
Thu, 25 Jul 2002 23:39:50 +0200


Ryan P. de Vega wrote:
> schubbe@web.de writes:
> 
>>This seems to be a permission problem. Is that user able to paste the 
>>object into 'Test' by hand?
> 
> <-- Answer: Yes
> 
> I thought that you might be on to something ... so I gave that user full
> permission temporarily.  Still a no go.  :( 
> 
> REQUEST=context.REQUEST
> if REQUEST.has_key('ids'):
>   tmpObj = context.manage_copyObjects(REQUEST['ids'])
>   context.portal_url.getPortalObject().TEST.manage_pasteObjects(tmpObj)
>   return REQUEST.RESPONSE.redirect(context.absolute_url() +
> '/folder_contents?portal_status_message=Item(s)+Published.')
> 
> 
> Like this????  All I have to put is TEST (the name of my folder).  I don't
> have to define TEST or do any other fancy stuff? - By the way I tried that
> stuff too.

Nothing. If you want you can use this instead:
context.portal_url.getPortalObject()['TEST'].manage_pasteObjects(tmpObj)

But that can't be the problem. I did copy your code in my site - it 
works for me!

I surrender. Have a look at CopySupport.py and the lines that raise your 
error. Anybody else has idea?

Yuppie