MCPcopy
hub / github.com/CodebuffAI/codebuff / banUser

Function banUser

web/src/lib/ban-conditions.ts:110–121  ·  view source on GitHub ↗
(
  userId: string,
  reason: string,
  logger: Logger,
)

Source from the content-addressed store, hash-verified

108 * Ban a user and log the action
109 */
110export async function banUser(
111 userId: string,
112 reason: string,
113 logger: Logger,
114): Promise<void> {
115 await db
116 .update(schema.user)
117 .set({ banned: true })
118 .where(eq(schema.user.id, userId))
119
120 logger.info({ userId, reason }, 'User banned')
121}
122
123/**
124 * Evaluate all ban conditions for a user

Callers 2

webhookHandlerFunction · 0.90

Calls 1

setMethod · 0.80

Tested by

no test coverage detected