feat: organization guardrails and team seat billing (#581-582)#742
feat: organization guardrails and team seat billing (#581-582)#7422witstudios wants to merge 4 commits intomasterfrom
Conversation
- Organizations table with guardrail settings: allowedAIProviders, maxStorage, maxAITokens, requireMFA, allowExternalSharing, allowedDomains - Org members table with OWNER/ADMIN/MEMBER roles - Org drives junction table to link drives to orgs - Org subscriptions table for per-seat billing - Pure guardrail check functions with 19 passing unit tests - Org auth middleware (withOrgAuth, withOrgAdminAuth, withOrgOwnerAuth) - CRUD API routes: orgs, org details, settings, members - Drizzle migration generated Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 4-tier org billing: Free/Pro($14/seat)/Business($28/seat)/Enterprise - Seat manager: auto-adjust quantity on member add/remove - Prorated billing on seat changes with 3-day grace period - API routes: GET/POST billing, GET/PUT seats, GET invoices - Org webhook handlers for subscription lifecycle events - 16 passing unit tests for billing plans Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (21)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Remove unused 'and' import from org-webhook-handlers.ts - Remove unused 'orgMembers' import from seat-manager.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Follow existing codebase pattern for accessing confirmation_secret from expanded latest_invoice, using proper Stripe.Invoice type intersection instead of Record<string, unknown> cast. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Test plan
cd apps/web && pnpm vitest run src/lib/orgs/__tests__/🤖 Generated with Claude Code