bugfix: invitation link copy option disapearing fixed. route problem for unauthorizrd users opening invitation link fixed.
This commit is contained in:
@@ -288,8 +288,11 @@ export class OrganizationService {
|
||||
if (!invitation) {
|
||||
throw new NotFoundException('Invitation not found');
|
||||
}
|
||||
if (invitation.acceptedAt || invitation.revokedAt) {
|
||||
throw new BadRequestException('Only pending invitations can provide a link');
|
||||
if (invitation.acceptedAt) {
|
||||
throw new BadRequestException('This invitation has already been accepted');
|
||||
}
|
||||
if (invitation.revokedAt) {
|
||||
throw new BadRequestException('This invitation is no longer valid');
|
||||
}
|
||||
|
||||
const plainToken = this.generateInviteToken();
|
||||
|
||||
Reference in New Issue
Block a user