feat(app-shell): "why can this user access?" explain panel in the Studio Access pillar (ADR-0090 D6) - #2375
Merged
Merged
Conversation
…dio Access pillar (ADR-0090 D6, framework#2696) Right-side sheet opened from the Access pillar header: pick a user (defaults to the calling principal), an object and an operation; calls the new backend POST /api/v1/security/explain and renders the ExplainDecision trace — allowed/denied verdict banner, resolved principal chain (positions → permission sets with via attribution), the nine evaluation-pipeline layers with per-verdict badges, and the composed row filter for reads. A 403 from the manage_users / delegated-admin-scope gate (D12) renders as a friendly localized message. EN + ZH copy in the metadata-admin string tables. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WTubNprerCmJoU1VtUWA93
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
摘要
ADR-0090 D6(framework#2696)的 UI 半边:Studio Access 支柱新增 "why can this user access?" 解释面板,消费 framework 侧新增的
POST /api/v1/security/explain端点(framework#2743)。交互
Sheet(样式对齐BuildDebugDrawer/ActivityFeed);RecordPickerDialog选择sys_user)、对象名、操作(read/create/update/delete/transfer/restore/purge);createAuthenticatedFetch()调用POST /api/v1/security/explain(自动携带 Bearer token /X-Tenant-ID,dev 下按VITE_SERVER_URL提升到后端 origin,与MetadataTypeActions同一约定)。渲染
ExplainDecision追踪onBehalfOf)、positions → permission sets 徽章(via归因放 tooltip);readFilter)等宽块;manage_users/ 委托管理范围门,D12)渲染为友好的本地化提示,而不是原始错误。其他
metadata-admin/i18n.ts(engine.studio.access.explain.*);metadata-admin/AccessExplainPanel.tsx,未增大StudioDesignSurface.tsx(仅 +按钮/状态/挂载);测试
AccessExplainPanel.test.tsx(3 个集成用例,驱动真实组件 + 假authFetch):请求形状(POST body{ object, operation })与 allowed 追踪渲染;denied 横幅与 denies 徽章;403 → 本地化 D12 提示。PermissionMatrixEditor.scope.test.tsx回归通过;@object-ui/app-shelltsc --noEmit通过。关联
🤖 Generated with Claude Code
https://claude.ai/code/session_01WTubNprerCmJoU1VtUWA93
Generated by Claude Code