()
| 13 | // non-sensitive mirror used purely for conditionally rendering admin UI; |
| 14 | // server-side enforcement still goes through `isAdmin` above. |
| 15 | export function getPublicAdminIds(): string[] { |
| 16 | return (process.env.NEXT_PUBLIC_ADMIN_USER_IDS ?? "") |
| 17 | .split(",") |
| 18 | .map((id) => id.trim()) |
| 19 | .filter(Boolean); |
| 20 | } |
| 21 | |
| 22 | export function isAdminClient(userId: string | null | undefined): boolean { |
| 23 | if (!userId) return false; |