* lock users on signup if their email is in blacklist * add to turbo env list * prevent locked user or blocked email domain from using API * Refactored to only run 1 query to find the user * Fixing tests * WIP * WIP * WIP * Discard changes to turbo.json * Fixed tests * Update isLockedOrBlocked.test.ts * Update isAdmin.integration-test.ts * Update tsconfig.json * chore: rename to watchlist Signed-off-by: Omar López <zomars@me.com> --------- Signed-off-by: Omar López <zomars@me.com> Co-authored-by: sean-brydon <sean@cal.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
20 lines
573 B
TypeScript
20 lines
573 B
TypeScript
import { WatchlistType } from "@calcom/prisma/enums";
|
|
|
|
import type { IWatchlistRepository } from "./watchlist.repository.interface";
|
|
|
|
export class MockFeaturesRepository implements IWatchlistRepository {
|
|
async getEmailInWatchlist(email: string) {
|
|
if (email !== "watchlisted@example.com") return null;
|
|
return {
|
|
id: "1",
|
|
type: WatchlistType.EMAIL,
|
|
value: "watchlisted@example.com",
|
|
description: "This is a watchlisted email",
|
|
createdAt: new Date(),
|
|
createdById: 1,
|
|
updatedAt: new Date(),
|
|
updatedById: 1,
|
|
};
|
|
}
|
|
}
|