Repository navigation
fix(plugin-detail): related table offers Export only to a reader who may export - #30156
Merged
objectstack-fleet[bot] merged 3 commits intoNov 5, 2026
Merged
Conversation
Claude-Session: https://claude.ai/code/session_01QSeKYpFBMr917PmVkG9up7 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYpFBMr917PmVkG9up7 Co-authored-by: Claude <noreply@anthropic.com>
… failure control Claude-Session: https://claude.ai/code/session_01QSeKYpFBMr917PmVkG9up7 Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Nov 4, 2026
Merged
objectstack-fleet
Bot
deleted the
claude/issue-30069-related-export-permission
branch
November 5, 2026 01:05
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 free
to 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.
Fixes #30069
Clause-②: no
Metadata-protocol: none
维护者速读
ui/packages/plugin-detail/src/RelatedList.tsx(exportPermitted一段与导出失败分支);ui/packages/plugin-list/src/ListView.tsx与ui/packages/plugin-grid/src/ObjectGrid.tsx的导出 catch。pnpm --dir ui exec vitest run packages/plugin-detail/src/__tests__/RelatedList.enlargedToolbar-27524.test.tsx,预期 9 个测试全部通过,其中 4 个是本卡新加的(无导出权限不见按钮、有权限只导出本关系的行、中文界面下 403 显示中文、非拒绝类失败仍显示服务器原句)。What changes
usePermissions().getObjectApiOperations, the same source and the same default-allow rule asListView'sexportPermitted(andObjectGrid's andReportExportControl's). A reader whose set leaves outexportsees no Export; a missing set keeps the button, as on the list page. The export request itself is unchanged, so a reader who may export still exports this relation's rows alone (the parent scope, the list filter, the chip, the filter text and the order).exportDownload. The three doors are the related table, the list page and the grid. Each showed the thrown error'smessage, which for the export route's 403 is the server's English sentence ("Export is not permitted on object ..."). Each now asks the existing shared classifierisPermissionErrorfrom@object-ui/react(403,PERMISSION_DENIED,FORBIDDEN) and, when it answers true, shows the newview.exportNotPermittedsentence. Any other failure keeps the server's sentence.view.exportNotPermittedis added to all ten locale packs, and to the three packages' provider-less default maps, byte-identical to theenpack (the precedent isview.malformedFilter, one sentence shared by several surfaces).EXPORT_NOT_PERMITTED) with status 403, so no server change is needed andpackages/**is untouched.Tests
Run on head
31bb7e7cb.RelatedList.enlargedToolbar-27524.test.tsxgains one top-leveldescribe(the component's shared harness) with four cases under a realMePermissionsProviderandI18nProvider: a reader withoutexportsees no Export and the export route is never called; a reader withexportsees it and the request is scoped to the parent (lead=L-1); underzha 403EXPORT_NOT_PERMITTEDshows the Chinese sentence and not the server's; a 504 control still shows the server's sentence.ListView.test.tsxandexportServer.test.tsx(grid): the existing "surfaces export failures" pins usednew Error('Permission denied'), which is itself a refusal shape. They now use a 504 so they keep pinning "a failure is surfaced, not swallowed", and a refusal case beside each pins the Console sentence and the absence of the server's text.Affected suites and type-check
Ablations (one-time proofs; each restored, blob == HEAD and git diff HEAD empty)
The test imports
../RelatedListfrom source, so no build sits between the mutation and the run. Both mutations went throughscripts/ablation-replace.mjs(anchor x1 to x0, replacement x0 to x1).Acceptance notes
apiOperationsofapi, the object its export request is sent to, so the question and the request name the same object.enableblock (theapi-disabledkind ofclassifyLoadError) is not a permission refusal, and it still shows the server's sentence in all three doors. Observation only, not measured against a running server.ReportExportControlbuilds its file in the browser and calls no export route, so it has no server refusal to localize.Verification
Local gate families (derived with dispatch-gates --commands from the branch's change set, 36 families, each exit captured before any pipe)
The repo-wide scans (
pnpm lintand the rest of the farm) are CI's.Generated by Claude Code