MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / isSuperUser

Function isSuperUser

console/src/api/auth.tsx:83–85  ·  view source on GitHub ↗
(user: User | null)

Source from the content-addressed store, hash-verified

81}
82
83export function isSuperUser(user: User | null): boolean {
84 return !!user && Boolean(user.roles.find((r) => r.key === ADMIN_ROLE_KEY));
85}
86
87export function getCurrentTenant(
88 user: User,

Callers 1

MfaAlertContentFunction · 0.90

Calls 2

BooleanClass · 0.50
findMethod · 0.45

Tested by

no test coverage detected