From 6bbd473a77d47b218a6222d70912e54c7375d923 Mon Sep 17 00:00:00 2001 From: Tereshchenko Aleksandr Date: Thu, 13 Jun 2024 14:12:54 +0300 Subject: [PATCH] Do not check if an invite token is used already or not to allow students clicking links multiple times --- backend/src/services/EmailInviteService.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/services/EmailInviteService.js b/backend/src/services/EmailInviteService.js index 6bfd8391..75940d90 100644 --- a/backend/src/services/EmailInviteService.js +++ b/backend/src/services/EmailInviteService.js @@ -51,7 +51,9 @@ export function getEmailInviteDataForToken(token) { return knex('emailInvite') .select() .where('token', token) - .where('used', false) + // we want to allow users clicking the link multiple times + // therefore we do not check if the token is used + // .where('used', false) .first() }