You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
luoweijian
78aa9748e4
feat: 数据权限按业务模块可配(ADR-0018)
将数据权限从「单一全局档位」改造为「按业务模块分别配置档位」:
- 新增 sys_data_scope_module 注册表 + sys_role_data_scope 角色×模块档位表
- @DataScope 注解新增必填 module 属性,启动时校验 code 在注册表中存在
- DataVisibility 持有 Map<String, DataScopeLevel> 替代单个 level
- DataVisibilityContext.currentScope(moduleCode) 加参数取该模块的 scope
- DataScopeInterceptor 顺序调换:先找表→查注解→取该模块 scope→注入 WHERE
- PermissionResolverImpl 查 sys_role_data_scope 按 module_code 分组取最宽
- 删除 SysRole.dataScope 列 + 删除 DataScopeEnum.CUSTOM(5)
- RoleController saveOrUpdate 用 moduleScopes JSON 替代 dataScope
- 新增 GET /api/data-scope/modules 端点
- saveRoleWithScopes 原子事务(角色保存+范围全量替换同提交同回滚)
- DataScopeModuleController 返回 DTO 不泄露 BaseEntity 审计字段
- 一次性迁移 SQL 脚本(单事务,CROSS JOIN 旧值,DROP 旧列)
- DataInitializer 初始化 4 个内置模块 + ADMIN 每模块 ALL 档位
- 全量测试通过:crm-base 80 tests + crm-auth 153 tests
|
4 weeks ago |
| .. |
|
src
|
feat: 数据权限按业务模块可配(ADR-0018)
|
4 weeks ago |
|
CONTEXT.md
|
feat: 数据权限按业务模块可配(ADR-0018)
|
4 weeks ago |
|
crm-auth.iml
|
first-commit
|
1 month ago |
|
pom.xml
|
feat(crm-auth): Ticket 04 — 图标上传
|
1 month ago |