fix: Cannot move a document to nested child in private collection
This commit is contained in:
@ -814,7 +814,9 @@ router.post('documents.move', auth(), async ctx => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (parentDocumentId) {
|
if (parentDocumentId) {
|
||||||
const parent = await Document.findByPk(parentDocumentId, user.id);
|
const parent = await Document.findByPk(parentDocumentId, {
|
||||||
|
userId: user.id,
|
||||||
|
});
|
||||||
authorize(user, 'update', parent);
|
authorize(user, 'update', parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user