Commit 09d063469477474cd9f26918b8e580a295cd335b
Committed by
Gitee
!72 数据权限-部门及以下权限问题
Merge pull request !72 from @C/master
Showing
1 changed file
with
2 additions
and
0 deletions
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/permission/PermissionServiceImpl.java
| @@ -385,6 +385,8 @@ public class PermissionServiceImpl implements PermissionService { | @@ -385,6 +385,8 @@ public class PermissionServiceImpl implements PermissionService { | ||
| 385 | if (Objects.equals(role.getDataScope(), DataScopeEnum.DEPT_AND_CHILD.getScope())) { | 385 | if (Objects.equals(role.getDataScope(), DataScopeEnum.DEPT_AND_CHILD.getScope())) { |
| 386 | List<DeptDO> depts = deptService.getDeptsByParentIdFromCache(loginUser.getDeptId(), true); | 386 | List<DeptDO> depts = deptService.getDeptsByParentIdFromCache(loginUser.getDeptId(), true); |
| 387 | CollUtil.addAll(result.getDeptIds(), CollectionUtils.convertList(depts, DeptDO::getId)); | 387 | CollUtil.addAll(result.getDeptIds(), CollectionUtils.convertList(depts, DeptDO::getId)); |
| 388 | + //添加本身部门id | ||
| 389 | + CollUtil.addAll(result.getDeptIds(), loginUser.getDeptId()); | ||
| 388 | continue; | 390 | continue; |
| 389 | } | 391 | } |
| 390 | // 情况五,SELF | 392 | // 情况五,SELF |