Uh oh!
There was an error while loading. Please reload this page.
fix(attachments): authenticated uploads + friendly denial copy in RecordAttachmentsPanel (framework #2755) - #2532
Merged
Conversation
…ordAttachmentsPanel (#2755) Companion to framework #2755 (objectstack-ai/framework PR to follow): - The upload adapter now authenticates with the console's Bearer token via createAuthenticatedFetch — the framework's storage upload routes 401 anonymous callers once an auth service is wired, and the token console has no session cookie for credentials:'include' to carry. - The new fail-closed 403 codes (ATTACHMENT_DELETE_DENIED, ATTACHMENT_PARENT_ACCESS, PERMISSION_DENIED) render as friendly copy instead of raw server errors. The delete button still renders for every row by design: the server is the gate and the client lacks the parent-edit data to pre-compute it. - uploaded_by is still sent for back-compat with older servers; current servers stamp it from the session and ignore the client value. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0187NT3Qer9oep5dCRb9b8Lt
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 15, 2026 14:56
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 15, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to framework #2969 (issue objectstack-ai/objectstack#2755).
The framework now gates the storage upload routes on an authenticated session and enforces parent-derived attachment access on
sys_attachment.RecordAttachmentsPaneladapts:createAuthenticatedFetch()(from@object-ui/auth) so the presigned three-step upload carries the console's Bearer token. The token console has no session cookie for the adapter's defaultcredentials: 'include'to carry, so without this the framework's new upload gate would 401.ATTACHMENT_DELETE_DENIED,ATTACHMENT_PARENT_ACCESS,PERMISSION_DENIED) map to i18n messages instead of surfacing raw server error strings, on both the upload and delete paths.uploaded_byis still sent for back-compat with pre-feat(data-objectstack): gate non-atomic batch fallback on discoverytransactionalBatchcapability (#2693) #2755 servers; a current server stamps it from the session and ignores the client value.Verification
packages/app-shell/src/views/__tests__/RecordAttachmentsPanel.test.tsx— 3 ✓ (ATTACHMENT_DELETE_DENIED → friendly copy + no optimistic removal on failure; PERMISSION_DENIED → friendly copy; successful delete removes the row with no banner).app-shellsweep: 1248 ✓ (165 files).Merge order
Framework #2969first — the server gates land before the panel adapts to them.
🤖 Generated with Claude Code
Generated by Claude Code