fix: Moving documents between collections does not update attachment permissions (#2136)

* fix: Copy attachments when neccessary and moving between collections

* test: regression
This commit is contained in:
Tom Moor
2021-05-12 22:38:24 -07:00
committed by GitHub
parent 447371f35a
commit a93d034091
3 changed files with 97 additions and 11 deletions

View File

@ -242,11 +242,6 @@ export async function buildAttachment(overrides: Object = {}) {
overrides.userId = user.id;
}
if (!overrides.collectionId) {
const collection = await buildCollection(overrides);
overrides.collectionId = collection.id;
}
if (!overrides.documentId) {
const document = await buildDocument(overrides);
overrides.documentId = document.id;