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

Function isAdminOrOwner

apps/sim/lib/workspaces/organization/utils.ts:27–33  ·  view source on GitHub ↗
(
  organization: Organization | null | undefined,
  userEmail?: string
)

Source from the content-addressed store, hash-verified

25 * Check if a user is an admin or owner in an organization
26 */
27export function isAdminOrOwner(
28 organization: Organization | null | undefined,
29 userEmail?: string
30): boolean {
31 const role = getUserRole(organization, userEmail)
32 return isOrgAdminRole(role)
33}
34
35/**
36 * Calculate seat usage for an organization

Callers 1

TeamManagementFunction · 0.90

Calls 2

isOrgAdminRoleFunction · 0.90
getUserRoleFunction · 0.85

Tested by

no test coverage detected