MCPcopy
hub / github.com/cursor/community-plugins / isAdmin

Function isAdmin

apps/cursor/src/utils/admin.ts:8–10  ·  view source on GitHub ↗
(userId: string)

Source from the content-addressed store, hash-verified

6}
7
8export function isAdmin(userId: string): boolean {
9 return getAdminIds().includes(userId);
10}
11
12// Browser-safe admin check. Reads NEXT_PUBLIC_ADMIN_USER_IDS, which is a
13// non-sensitive mirror used purely for conditionally rendering admin UI;

Callers 2

safe-action.tsFile · 0.90
AdminPluginsContentFunction · 0.90

Calls 1

getAdminIdsFunction · 0.85

Tested by

no test coverage detected