diff --git a/server/api/documents.js b/server/api/documents.js index 872ae511..47648a6b 100644 --- a/server/api/documents.js +++ b/server/api/documents.js @@ -887,9 +887,9 @@ router.post('documents.move', auth(), async ctx => { const user = ctx.state.user; const document = await Document.findByPk(id, { userId: user.id }); - const { collection } = document; authorize(user, 'move', document); + const { collection } = document; if (collection.type !== 'atlas' && parentDocumentId) { throw new InvalidRequestError( 'Document cannot be nested in this collection type'