From 6211f84de886595e3051811f55701c7c0a6935f2 Mon Sep 17 00:00:00 2001 From: Weiko Date: Wed, 17 Apr 2024 10:55:47 +0200 Subject: [PATCH] block invite link if workspace subscription is not active (#4991) Fixes https://github.com/twentyhq/twenty/issues/4980 ## Test tested locally with incomplete and active --- .../engine/core-modules/auth/services/sign-in-up.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts index 51f7528488..c783cef338 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts @@ -132,11 +132,12 @@ export class SignInUpService { }) { const workspace = await this.workspaceRepository.findOneBy({ inviteHash: workspaceInviteHash, + subscriptionStatus: 'active', }); assert( workspace, - 'This workspace inviteHash is invalid', + 'This workspace inviteHash is invalid or the workspace is not active', ForbiddenException, );