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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,
);