feat: add auth gate and Chinese command parsing

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
owo
2026-08-14 16:04:38 +08:00
co-authored by Cursor
parent a070a77e6b
commit db09bc6327
4 changed files with 82 additions and 0 deletions
+9
View File
@@ -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)
}