(subscription: any)
| 167 | * @returns Whether the user can edit their usage limits |
| 168 | */ |
| 169 | export 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'`) |
no test coverage detected