Repository navigation
feat(org): dual-identity UX bounds — studio vs org room (P1.3) - #78
Merged
Merged
Conversation
Keep FreeOS studio auth and organization-room auth as separate doors. Organization roles stay in organization_role and never become host Role.ADMIN. Studio guests cannot write org business with a host JWT. Soft copy uses 工作室 / 另一间房间 / 各自留白. Co-authored-by: XYAI Labs <haoboy8@gmail.com>
cursor
Bot
force-pushed
the
cursor/dual-identity-ux-bounds-69ba
branch
from
September 20, 2026 10:46
1e493b4 to
6390eee
Compare
This was referenced Sep 20, 2026
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.
摘要
把 FreeOS 工作室本机登录 与组织 房间登录 拆成两扇门,互不顶替、互不抬权。本机先安顿(注册 / 登录 / 数据留在设备上);组织能力是工作室里的另一间房间——试用、布置流程,可以和宿主对话协作,但不会把两种进入方式捏成同一种。
界面与文档用软隐喻:工作室 / 另一间房间 / 各自留白。不写生硬的「非正式 / 无关账号 / 独立测试环境」。
已 rebase 到最新
main(含 P1.2 #77 与产品契约 P0.1)。冲突仅 CHANGELOG:P1.3 与 P1.2 / P1.1 / P0.2 条目一并保留。双身份边界与测试未丢。身份边界
auth_token,/api/auth/local-session|login|register)。FREEOS_ORG_INTEGRATED不再替换宿主鉴权。org_room_token;openXYOS iframe 自己的登记本)。resolve_organization_user宿主角色 始终Role.USER;组织角色只写在organization_role。已入库的admin会被降回user。super_admin不会被抬成宿主Role.ADMIN。/api/org-module/business/*与 sidecar 写操作要求has_organization_identity。X-FreeOS-Role为guest。/organization307 跳过工作室壳层;登录页始终是工作室门,房间只作为可选入口。文案与文档
docs/user-guide.md§5.1、docs/architecture-integration.md、docs/org-merge-plan.mdIdentityBridge、docs/api.md。CHANGELOG.mdUnreleased(与 P1.2 / P1.1 / P0.2 并存)。测试
tests/unit/api/test_org_identity.py、user manager 不抬权 / 降权、JWT 中间件宿主会话、dashboard_serve 无 307、sidecar 写操作拒绝访客。hostUserFromOrganization恒为宿主user、AuthGuard 不用房间 token 当工作室会话、OrganizationEntry 房间提示。rebase 后复跑:
uv run pytest tests/unit/api/test_org_identity.py tests/unit/test_identity.py tests/unit/test_user_manager.py tests/unit/test_org_module.py tests/unit/api/test_jwt_auth_middleware.py→ 81 passed。Target branch
maindevelopType of change
Checklist
CHANGELOG.md范围外
P1.4 本地模型/知识库、P1.2 导出(已在 main)、砍 Node、完整
App.tsx迁移。成功标准
用户能把 FreeOS 登录和组织房间登录当成两扇分开的门来用;组织管理员不会被悄悄抬成宿主管理员。