From 5248c95211f83f7e22e5f324297ac48b0e0e7116 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 18 Mar 2024 23:10:58 -0400 Subject: [PATCH] fix: Shared documents on suspended teams should be hidden --- server/commands/documentLoader.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/commands/documentLoader.ts b/server/commands/documentLoader.ts index fe66197fb..4262e54b0 100644 --- a/server/commands/documentLoader.ts +++ b/server/commands/documentLoader.ts @@ -186,6 +186,9 @@ export default async function loadDocument({ // It is possible to disable sharing at the team level so we must check const team = await Team.findByPk(document.teamId, { rejectOnEmpty: true }); + if (team.suspendedAt) { + throw NotFoundError(); + } if (!team.sharing) { throw AuthorizationError(); }