feat(platform-objects): A3 — 用户页 Permission Sets + Business Units 分配入口 (#2920)#2927
Merged
Conversation
#2920) sys_user 记录页新增两个纯 SDUI record:related_list tab,让管理员在单个 用户页完成三类分配:岗位(已有 Positions)、直接权限集授权、业务单元归属。 - Permission Sets: junction sys_user_permission_set(id-keyed, relationshipField=user_id),picker 绑定 sys_permission_set (linkField=permission_set_id)。 - Business Units: junction sys_business_unit_member(id-keyed, relationshipField=user_id),picker 绑定 sys_business_unit (linkField=business_unit_id,按 name 标注)。 tab 顺序 Positions → Permission Sets → Business Units,四语言标签齐全。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QRUvVfpvSycAHMMF2xTxs
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 14, 2026 23:45
9 tasks
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.
A3 — 用户页一站式分配入口 (tracking #2920)
让管理员在单个
sys_user记录页完成三类分配。Positions tab 已存在,本 PR 补齐两个同款纯 SDUI tab,tab 顺序为 Positions → Permission Sets → Business Units。改动
packages/platform-objects/src/pages/sys-user.page.ts— 在 Positions tab 之后新增两个record:related_list+ Add picker 的 tab:Permission Sets(直接授权)
sys_user_permission_set(id-keyed 的Field.lookup),relationshipField: 'user_id'(无relationshipValueField)。sys_permission_set,linkField: 'permission_set_id',labelField: 'label'。permission_set_id / organization_id / granted_by / created_at。Business Units(业务单元归属)
sys_business_unit_member(id-keyed 的Field.lookup),relationshipField: 'user_id'(无relationshipValueField)。sys_business_unit,linkField: 'business_unit_id'。sys_business_unit无label字段,故 picker 按其显示字段name标注。business_unit_id / function_in_business_unit / is_primary / created_at。两个 tab 均补齐 en / zh-CN / ja-JP / es-ES 四语言标签,与现有 Positions tab 处理方式一致。
junction 字段类型确认
两个 junction 的
user_id(以及permission_set_id/business_unit_id)都是Field.lookup(...),即 id-keyed,与 sys-user Positions tab、sys-position Permission Sets tab 的 id-keyed 模式一致 —— 因此不需要relationshipValueField(该字段仅用于 sys-position Holders 那种 name-keyed junction)。验证
pnpm --filter "@objectstack/platform-objects..." build✅(CJS + ESM + DTS 全过;单独 build 时的metadata-core报错是仓库既有的依赖构建顺序问题,与本改动无关,带依赖构建即通过)。pnpm --filter @objectstack/platform-objects test✅ 80/80 通过。changeset
.changeset/a3-user-assignment-tabs.md(minor)。关联 #2920 · 这是 A3(用户页一站式分配入口)。
🤖 Generated with Claude Code
https://claude.ai/code/session_019QRUvVfpvSycAHMMF2xTxs
Generated by Claude Code