fix: allow-reschedule-on-prevent-impersonation (#25427)
* fix: allow-reschedule-on-prevent-impersonation * remove selfexplanatory comment
This commit is contained in:
@@ -8,10 +8,12 @@ export const checkIfBookerEmailIsBlocked = async ({
|
||||
bookerEmail,
|
||||
loggedInUserId,
|
||||
verificationCode,
|
||||
isReschedule = false,
|
||||
}: {
|
||||
bookerEmail: string;
|
||||
loggedInUserId?: number;
|
||||
verificationCode?: string;
|
||||
isReschedule?: boolean;
|
||||
}) => {
|
||||
const baseEmail = extractBaseEmail(bookerEmail);
|
||||
|
||||
@@ -52,7 +54,7 @@ export const checkIfBookerEmailIsBlocked = async ({
|
||||
});
|
||||
|
||||
const blockedByUserSetting = user?.requiresBookerEmailVerification ?? false;
|
||||
const shouldBlock = !!blacklistedByEnv || blockedByUserSetting;
|
||||
const shouldBlock = !!blacklistedByEnv || (blockedByUserSetting && !isReschedule);
|
||||
|
||||
if (!shouldBlock) {
|
||||
return false;
|
||||
|
||||
@@ -542,6 +542,7 @@ async function handler(
|
||||
loggedInUserId: userId,
|
||||
bookerEmail,
|
||||
verificationCode: reqBody.verificationCode,
|
||||
isReschedule: !!rawBookingData.rescheduleUid,
|
||||
});
|
||||
} catch (error) {
|
||||
if (error instanceof ErrorWithCode) {
|
||||
|
||||
Reference in New Issue
Block a user