From 2d2ad83469f1107126df7b86266e13c37bd74d45 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 16 Oct 2019 08:45:21 -0700 Subject: [PATCH] fix: Cannot move a document to nested child in private collection --- server/api/documents.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/api/documents.js b/server/api/documents.js index 9c31d94d..653a4479 100644 --- a/server/api/documents.js +++ b/server/api/documents.js @@ -814,7 +814,9 @@ router.post('documents.move', auth(), async ctx => { } if (parentDocumentId) { - const parent = await Document.findByPk(parentDocumentId, user.id); + const parent = await Document.findByPk(parentDocumentId, { + userId: user.id, + }); authorize(user, 'update', parent); }