MCPcopy Index your code
hub / github.com/simstudioai/sim / isEmailBlocked

Function isEmailBlocked

apps/sim/lib/auth/ban.ts:21–30  ·  view source on GitHub ↗
(email: string | null | undefined)

Source from the content-addressed store, hash-verified

19 * resolve to a known user id.
20 */
21export async function isEmailBlocked(email: string | null | undefined): Promise<boolean> {
22 if (!email) return false
23 const accessControl = await getAccessControlConfig()
24 if (isEmailBlockedByAccessControl(email, accessControl)) return true
25 const rows = await db
26 .select({ banned: user.banned, banExpires: user.banExpires })
27 .from(user)
28 .where(sql`lower(${user.email}) = ${email.toLowerCase()}`)
29 return rows.some(isBanActive)
30}
31
32/**
33 * Returns the subset of the given user ids that are currently blocked: an

Callers 2

executeInboxTaskFunction · 0.90
ban.test.tsFile · 0.90

Calls 2

getAccessControlConfigFunction · 0.90

Tested by

no test coverage detected