Merge branch 'main' into feat/mass-import

This commit is contained in:
Tom Moor
2021-02-09 20:46:57 -08:00
committed by GitHub
42 changed files with 663 additions and 295 deletions

View File

@ -489,6 +489,11 @@ async function loadDocument({ id, shareId, user }) {
authorize(user, "read", document);
}
const collection = await Collection.findByPk(document.collectionId);
if (!collection.sharing) {
throw new AuthorizationError();
}
const team = await Team.findByPk(document.teamId);
if (!team.sharing) {
throw new AuthorizationError();