Began migration of queries to nested sets

This commit is contained in:
Thaum Rystra
2023-10-03 16:28:20 +02:00
parent 28a19f2037
commit f63d2ad254
41 changed files with 242 additions and 392 deletions

View File

@@ -45,8 +45,8 @@ function updateReferenceNodeWork(node, userId) {
try {
doc = fetchDocByRef(node.ref);
if (doc.removed) throw 'Property has been deleted';
if (doc.ancestors[0].id !== node.ancestors[0].id) {
library = fetchDocByRef(doc.ancestors[0]);
if (doc.root.id !== node.root.id) {
library = fetchDocByRef(doc.root);
assertViewPermission(library, userId)
}
} catch (e) {