EZQMS-1393: implemented folders in controlled documents (#7803)

* EZQMS-1393: implemented folders in controlled documents

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

* formatting

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

---------

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
Victor Ilyushchenko
2025-01-28 10:02:13 +03:00
committed by GitHub
parent f8a8c94bc2
commit 40931c81ca
21 changed files with 633 additions and 83 deletions
+2 -2
View File
@@ -443,9 +443,9 @@ async function _transferDocuments (
if (bundle.DocumentMeta.length !== 1) return false
if (bundle.ProjectMeta.length !== 1) return false
if (bundle.DocumentMeta[0].space !== cx.request.sourceSpaceId) return false
if (bundle.ControlledDocument.length < 1) return false
const isTemplate = hierarchy.hasMixin(bundle.ControlledDocument[0], documents.mixin.DocumentTemplate)
const anydoc = bundle.ControlledDocument[0]
const isTemplate = anydoc !== undefined && hierarchy.hasMixin(anydoc, documents.mixin.DocumentTemplate)
if (isTemplate && hierarchy.isDerived(cx.targetSpace._class, documents.class.ExternalSpace)) return false
}