feat: add account_id param to PATCH /api/sandboxes for Org API keys#199
Conversation
Add optional account_id parameter to UpdateSnapshotRequest, allowing organization API keys to update snapshots for any account within their organization. Personal API keys cannot use this parameter. The account_id is passed to validateAuthContext which handles: - Self-access (always allowed) - Org key access to member accounts - 403 for unauthorized access attempts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Braintrust eval reportCatalog Opportunity Analysis Evaluation (HEAD-1770214139)
Catalog Songs Count Evaluation (HEAD-1770214139)
First Week Album Sales Evaluation (HEAD-1770214139)
Memory & Storage Tools Evaluation (HEAD-1770214139)
Monthly Listeners Tracking Evaluation (HEAD-1770214139)
Search Web Tool Evaluation (HEAD-1770214139)
Social Scraping Evaluation (HEAD-1770214139)
Spotify Followers Evaluation (HEAD-1770214139)
Spotify Tools Evaluation (HEAD-1770214139)
TikTok Analytics Questions Evaluation (HEAD-1770214139)
|
📝 WalkthroughWalkthroughThis PR refactors the snapshot patch validation logic by introducing an optional Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary
account_idparameter to PATCH/api/sandboxesendpointChanges
validateSnapshotPatchBody.ts:account_id(UUID) to request body schemaaccount_idtovalidateAuthContextfor authorizationReference
account_idfor Org API keys:PATCH /api/pulsesPOST /api/artistsPOST /api/workspacesTest plan
account_idaccount_id) worksaccount_idreturns 403account_idfor non-member account returns 403🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements