fix: Cannot move a document to nested child in private collection

This commit is contained in:
Tom Moor
2019-10-16 08:45:21 -07:00
parent b95e1cdef3
commit 2d2ad83469

View File

@ -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);
}