fix: Shared documents on suspended teams should be hidden
This commit is contained in:
@@ -186,6 +186,9 @@ export default async function loadDocument({
|
|||||||
// It is possible to disable sharing at the team level so we must check
|
// It is possible to disable sharing at the team level so we must check
|
||||||
const team = await Team.findByPk(document.teamId, { rejectOnEmpty: true });
|
const team = await Team.findByPk(document.teamId, { rejectOnEmpty: true });
|
||||||
|
|
||||||
|
if (team.suspendedAt) {
|
||||||
|
throw NotFoundError();
|
||||||
|
}
|
||||||
if (!team.sharing) {
|
if (!team.sharing) {
|
||||||
throw AuthorizationError();
|
throw AuthorizationError();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user