Translate all documenttypes as an editor

After using the example script[1] to create new domains for authors and editors my editors where able to create new folders and doctypes (also the custom folders/doctypes) within the cms.

But when I want an editor to translate a document from another folder (to which he has author rights) to translate in to their country domain I get the following error:

[TranslationWorkflowPlugin$TranslationAction.saveFolder:595] Workflow prevented storing translation for a0b2d6b5-e9e4-47d7-9ec4-bdafa8c05814 due to No document or folder was added: the query at /hippo:configuration/hippo:queries/hippo:templates/my-hippo-folder did not return a matching prototype for ‘myhippo:document’
[INFO] [talledLocalContainer] 14.09.2018 14:39:32 WARN http-nio-8080-exec-3 [AbstractWorkflowDialog.onOk:64] Could not execute workflow: could-not-create-folders

I was able to work around this by adding all custom folders to the script in the createAuthorDomains function:

createNodeRule(baseDomain, "hippo:configuration/hippo:queries/hippo:templates/new-custom-folder/hippostd:templates/hippostd:folder");

This works but I assume (and hope) a more durable solution must be possible. So I don’t have to edit the domain after each new doctype/folder. Any suggestions?

Thank you.

[1] Groovy Updater Script Examples - Bloomreach Experience Manager (PaaS/Self-Hosted) - The Fast and Flexible Headless CMS

I wouldn’t expect this to be necessary, but authorization can be tricky. Theoretically I would expect the rule at"/hippo:configuration/hippo:domains/defaultread/hippostd-templates/type-hippostd-templates" to give access to the templates. I guess they don’t have access to the node or some parent node. Not really sure and unfortunately I don’t have the time to explore it.

Thank you. After adding this and several other rights from the read/write domain I’m getting a new error message. So some succes is achieved.

cannot copy document which is not contained in a folder