chore: check off Task 2 (RbacModule + RbacService)
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
|
||||
## 2. RBAC 服务层
|
||||
|
||||
- [ ] 2.1 创建 RbacModule 和 RbacService:提供 findAllRoles/findRoleById/createRole/updateRole/deleteRole 方法
|
||||
- [ ] 2.2 实现角色 CRUD(含权限关联):创建角色时同时写入 RolePermission;更新时删除旧关联重建
|
||||
- [ ] 2.3 实现 getUserPermissions 方法:通过 User→UserRole→Role→RolePermission→Permission 链查询,去重后返回权限 code 列表
|
||||
- [ ] 2.4 实现 getPermissionTree 方法:返回按 group 分组的权限树,供前端权限一览和管理页使用
|
||||
- [x] 2.1 创建 RbacModule 和 RbacService:提供 findAllRoles/findRoleById/createRole/updateRole/deleteRole 方法
|
||||
- [x] 2.2 实现角色 CRUD(含权限关联):创建角色时同时写入 RolePermission;更新时删除旧关联重建
|
||||
- [x] 2.3 实现 getUserPermissions 方法:通过 User→UserRole→Role→RolePermission→Permission 链查询,去重后返回权限 code 列表
|
||||
- [x] 2.4 实现 getPermissionTree 方法:返回按 group 分组的权限树,供前端权限一览和管理页使用
|
||||
- [ ] 2.5 创建 RbacController:角色 CRUD + 权限树 + 用户-角色分配接口,所有接口加 @RequirePermission 守卫
|
||||
|
||||
## 3. 权限守卫实现
|
||||
|
||||
Reference in New Issue
Block a user