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

Function getActivelyBannedUserIds

apps/sim/lib/auth/ban.ts:38–53  ·  view source on GitHub ↗
(userIds: string[])

Source from the content-addressed store, hash-verified

36 * failure — callers must fail closed.
37 */
38export async function getActivelyBannedUserIds(userIds: string[]): Promise<string[]> {
39 const ids = [...new Set(userIds.filter(Boolean))]
40 if (ids.length === 0) return []
41
42 const [accessControl, rows] = await Promise.all([
43 getAccessControlConfig(),
44 db
45 .select({ id: user.id, email: user.email, banned: user.banned, banExpires: user.banExpires })
46 .from(user)
47 .where(inArray(user.id, ids)),
48 ])
49
50 return rows
51 .filter((row) => isBanActive(row) || isEmailBlockedByAccessControl(row.email, accessControl))
52 .map((row) => row.id)
53}

Callers 3

executeInboxTaskFunction · 0.90
ban.test.tsFile · 0.90
preprocessExecutionFunction · 0.90

Calls 3

getAccessControlConfigFunction · 0.90
isBanActiveFunction · 0.85

Tested by

no test coverage detected