Plone.app.iterate shallow copy

I'm wondering if anyone has ideas on how to implement a shallow copy when someone checks out a content item that is folderish...

The scenario is: you have a folder or say a folderish Dexterity content item that contains hundreds or thousands of items. Your site policy requires checking out a working copy, editing it, then checking it back in (maybe submitting it for review too).

There would be a registry setting that allows an admin to force shallow copy globally on check out.

The problem as far as I can tell is that the way it currently works is that manage_copyObjects() and manage_pasteObjects() are used to make the working copy and those are deep in Zope... probably best to let the Old Ones sleep...

but I'd be tempted to add code that checks if the ob is contained and skip it if so... https://github.com/zopefoundation/Zope/blob/2.13/src/OFS/CopySupport.py#L208

2 Likes