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

Function isBanActive

apps/sim/lib/auth/ban.ts:9–13  ·  view source on GitHub ↗
(row: { banned: boolean | null; banExpires: Date | null })

Source from the content-addressed store, hash-verified

7 * semantics: a ban whose `banExpires` is in the past is treated as lifted.
8 */
9export function isBanActive(row: { banned: boolean | null; banExpires: Date | null }): boolean {
10 if (!row.banned) return false
11 if (row.banExpires && row.banExpires.getTime() <= Date.now()) return false
12 return true
13}
14
15/**
16 * True when a raw email (e.g. an inbound sender) is blocked: it is in the

Callers 2

ban.test.tsFile · 0.90
getActivelyBannedUserIdsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected