pub fn require_active_plan(config: &CliConfig, operation: &str) -> Result<()>Expand description
Check if the user’s plan allows write/query operations
Returns Ok(()) if:
- No API key (free tier user, not bound to dashboard)
- Subscription is active, trialing, or past_due
- Subscription is canceled but still in grace period (planEndDate > now)
Returns error if:
- Subscription is canceled AND grace period has expired (planEndDate < now)
This enables strict access control: expired plans can only view data, not add new content or run queries.