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

Function isOrganizationOnEnterprisePlan

apps/sim/lib/billing/core/subscription.ts:428–449  ·  view source on GitHub ↗
(organizationId: string)

Source from the content-addressed store, hash-verified

426 * Used for Access Control (Permission Groups) feature gating
427 */
428export async function isOrganizationOnEnterprisePlan(organizationId: string): Promise<boolean> {
429 try {
430 if (!isBillingEnabled) {
431 return true
432 }
433
434 if (isAccessControlEnabled && !isHosted) {
435 return true
436 }
437
438 if (await isOrganizationBillingBlocked(organizationId)) {
439 return false
440 }
441
442 const orgSub = await getOrganizationSubscriptionUsable(organizationId)
443
444 return !!orgSub && checkEnterprisePlan(orgSub)
445 } catch (error) {
446 logger.error('Error checking organization enterprise plan status', { error, organizationId })
447 return false
448 }
449}
450
451/**
452 * Check if user has access to credential sets (email polling) feature

Callers 10

assertForkingEnabledFunction · 0.90
authorizeDrainAccessFunction · 0.90
isEnterpriseFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
getUserPermissionConfigFunction · 0.90

Calls 4

checkEnterprisePlanFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected