MCPcopy Create free account
hub / github.com/cursor/community-plugins / getPublicAdminIds

Function getPublicAdminIds

apps/cursor/src/utils/admin.ts:15–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

isAdminClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected