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
This commit is contained in:
Weiko
2024-04-17 10:55:47 +02:00
committed by GitHub
parent 6fa2aee624
commit 6211f84de8

View File

@ -132,11 +132,12 @@ export class SignInUpService {
}) { }) {
const workspace = await this.workspaceRepository.findOneBy({ const workspace = await this.workspaceRepository.findOneBy({
inviteHash: workspaceInviteHash, inviteHash: workspaceInviteHash,
subscriptionStatus: 'active',
}); });
assert( assert(
workspace, workspace,
'This workspace inviteHash is invalid', 'This workspace inviteHash is invalid or the workspace is not active',
ForbiddenException, ForbiddenException,
); );