MCPcopy Index your code
hub / github.com/simstudioai/sim / resolveAdmin

Function resolveAdmin

apps/sim/lib/core/config/feature-flags.ts:172–175  ·  view source on GitHub ↗

* Resolve platform-admin status lazily. Dynamically imported so the DB-backed * helper (and `@sim/db`) stay out of this config module's load graph for callers * that never reach an admin-gated flag.

(userId: string)

Source from the content-addressed store, hash-verified

170 * that never reach an admin-gated flag.
171 */
172async function resolveAdmin(userId: string): Promise<boolean> {
173 const { isPlatformAdmin } = await import('@/lib/permissions/super-user')
174 return isPlatformAdmin(userId)
175}
176
177/**
178 * The admin clause is resolved last and lazily: a global/userId/orgId match

Callers 1

evaluateFunction · 0.85

Calls 1

isPlatformAdminFunction · 0.85

Tested by

no test coverage detected