( email: string | undefined | null, config: AccessControlConfig )
| 43 | * not sign up, sign in, or execute anything". |
| 44 | */ |
| 45 | export function isEmailBlockedByAccessControl( |
| 46 | email: string | undefined | null, |
| 47 | config: AccessControlConfig |
| 48 | ): boolean { |
| 49 | if (!email) return false |
| 50 | const normalized = normalizeEmail(email) |
| 51 | if (config.blockedEmails.includes(normalized)) return true |
| 52 | return isEmailInDenylist(normalized, config.blockedSignupDomains) |
| 53 | } |
| 54 | |
| 55 | function normalizeList(values: unknown): string[] { |
| 56 | if (!Array.isArray(values)) return [] |
no test coverage detected