feat: add auth gate and Chinese command parsing
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
export function isAuthorized(opts: {
|
||||
allowAllUsers: boolean
|
||||
allowedUserIds: number[]
|
||||
userId?: number
|
||||
}): boolean {
|
||||
if (opts.allowAllUsers) return true
|
||||
if (opts.userId === undefined) return false
|
||||
return opts.allowedUserIds.includes(opts.userId)
|
||||
}
|
||||
Reference in New Issue
Block a user