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

Function isEmailInDenylist

apps/sim/lib/auth/access-control.ts:30–38  ·  view source on GitHub ↗
(
  email: string | undefined | null,
  denylist: readonly string[] | null
)

Source from the content-addressed store, hash-verified

28 * subdomain of one.
29 */
30export function isEmailInDenylist(
31 email: string | undefined | null,
32 denylist: readonly string[] | null
33): boolean {
34 if (!denylist || denylist.length === 0 || !email) return false
35 const domain = email.split('@')[1]?.toLowerCase()
36 if (!domain) return false
37 return denylist.some((entry) => domain === entry || domain.endsWith(`.${entry}`))
38}
39
40/**
41 * True when the email is individually banned (`blockedEmails`) or its domain

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected