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

Function canEditUsageLimit

apps/sim/lib/billing/subscriptions/utils.ts:169–177  ·  view source on GitHub ↗
(subscription: any)

Source from the content-addressed store, hash-verified

167 * @returns Whether the user can edit their usage limits
168 */
169export function canEditUsageLimit(subscription: any): boolean {
170 if (!subscription || !hasUsableSubscriptionStatus(subscription.status)) {
171 return false // Free plan users cannot edit limits
172 }
173
174 // Only Pro and Team plans can edit limits
175 // Enterprise has fixed limits that match their monthly cost
176 return isPro(subscription.plan) || isTeam(subscription.plan)
177}
178
179/**
180 * Get pricing info for a plan. Supports both legacy names (`'pro'`, `'team'`)

Callers 2

getUserUsageLimitInfoFunction · 0.90
utils.test.tsFile · 0.90

Calls 3

isProFunction · 0.90
isTeamFunction · 0.90

Tested by

no test coverage detected