feat(identity): 完成 A2 角色权限与数据范围全栈落地
背景:A2 开卡前完成 H1 权限门,确认权限点目录、特殊权限、SoD 三对、六类数据范围与超管隐式全集口径(ADR-001)。 改动: - shared:30 权限点 / 10 模块目录与元数据、特殊权限 6 编码、SoD 三对、角色与权限树契约;/me 改 dataScopes 多角色并集。 - prisma:expand 迁移新增 permissions / data_scopes;种子按原型口径重写角色权限、数据范围与 8 项特殊授予。 - api:角色 CRUD / 复制 / 停用 / 删除、权限点启动同步、SoD 40304、系统角色保护、六类范围 ScopeContext 与 CustomerDirectory 端口、变更审计与 outbox。 - web:方案 B 主从分栏三角色页面(列表 / 编辑器 / 新建),权限树、范围选择、特殊权限二次确认、保存影响、SoD 冲突、只读态与模板预填。 - 测试:角色集成 13 条 + A2 e2e 1 条;A1 全量回归。 验证:format:check / lint / typecheck / test(306)/ test:int(27)/ A2 e2e(1,复跑通过)/ openapi:export 全绿。
This commit is contained in:
1 parent
f97f97b0cd
commit
61894df401
80 files changed
+14380
-237
No files matched your search
+101
-2
@@ -77,7 +77,7 @@
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "当前用户、角色、权限点、数据范围",
|
||||
"summary": "当前用户、角色、权限点、数据范围(多角色并集)",
|
||||
"tags": [
|
||||
"identity-me"
|
||||
]
|
||||
@@ -287,6 +287,7 @@
|
||||
},
|
||||
"/api/v1/roles": {
|
||||
"get": {
|
||||
"description": "默认 status=active(兼容 A1 用户管理的角色多选);含权限点统计、用户数与数据范围",
|
||||
"operationId": "RolesController_list",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
@@ -299,10 +300,108 @@
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "角色列表(绑定用)",
|
||||
"summary": "角色列表(游标分页 + 筛选 + 排序)",
|
||||
"tags": [
|
||||
"identity-roles"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"description": "权限点默认全空、code 自动生成;保存即做 SoD 校验(40304);特殊权限单独授予",
|
||||
"operationId": "RolesController_create",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "新建角色",
|
||||
"tags": [
|
||||
"identity-roles"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/roles/{id}": {
|
||||
"get": {
|
||||
"operationId": "RolesController_detail",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "角色详情(权限点、特殊权限、数据范围、绑定用户)",
|
||||
"tags": [
|
||||
"identity-roles"
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"description": "系统角色仅显示名可改;status=enabled/disabled;返回 affectedUserCount 与软提示",
|
||||
"operationId": "RolesController_update",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "更新角色 / 启停",
|
||||
"tags": [
|
||||
"identity-roles"
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"description": "系统角色拒绝;有绑定用户(40903)只能停用",
|
||||
"operationId": "RolesController_remove",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "删除角色",
|
||||
"tags": [
|
||||
"identity-roles"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/permissions": {
|
||||
"get": {
|
||||
"description": "模块顺序与 design/a2-ui-v1/brief.md 对齐;特殊权限默认关闭、单独授予",
|
||||
"operationId": "PermissionsController_getTree",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
}
|
||||
],
|
||||
"summary": "权限点目录(10 模块树 + 特殊权限 + SoD 对)",
|
||||
"tags": [
|
||||
"identity-permissions"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/health": {
|
||||
|
||||
Reference in new issue
Block a user