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

Function isOrganizationOwnerOrAdmin

apps/sim/lib/billing/core/organization.ts:433–443  ·  view source on GitHub ↗
(
  userId: string,
  organizationId: string
)

Source from the content-addressed store, hash-verified

431 * @returns Promise<boolean> - True if the user is an owner or admin of the organization
432 */
433export async function isOrganizationOwnerOrAdmin(
434 userId: string,
435 organizationId: string
436): Promise<boolean> {
437 try {
438 return await isOrganizationAdminOrOwner(userId, organizationId)
439 } catch (error) {
440 logger.error('Error checking organization ownership/admin status:', error)
441 return false
442 }
443}

Callers 9

purchaseCreditsFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls 2

errorMethod · 0.80

Tested by

no test coverage detected