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 c783cef33..afcddf2c9 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,12 +132,18 @@ export class SignInUpService { }) { const workspace = await this.workspaceRepository.findOneBy({ inviteHash: workspaceInviteHash, - subscriptionStatus: 'active', }); assert( workspace, - 'This workspace inviteHash is invalid or the workspace is not active', + 'This workspace inviteHash is invalid', + ForbiddenException, + ); + + assert( + !this.environmentService.get('IS_BILLING_ENABLED') || + workspace.subscriptionStatus === 'active', + 'Workspace subscription status needs to be active', ForbiddenException, );