We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
部门管理——>部门赋权——>修改保存部门权限。src/main/java/org/jeecg/modules/systemrvice/impl/SysDepartPermissionServiceImpl.java 第63行。这段代码是不是有问题,我们在线上复现。场景:A部门和B部门,如果同时有权限Z,当我取消A部门的权限Z的时候,B部门也被自动勾选掉。代码63行再删除权限的时候,没有添加对应角色或者部门的条件限制,直接删除了系统内包含此权限的所有部门角色权限关联关系。
`
public void saveDepartPermission(String departId, String permissionIds, String lastPermissionIds) { List<String> add = getDiff(lastPermissionIds,permissionIds); if(add!=null && add.size()>0) { List<SysDepartPermission> list = new ArrayList<SysDepartPermission>(); for (String p : add) { if(oConvertUtils.isNotEmpty(p)) { SysDepartPermission rolepms = new SysDepartPermission(departId, p); list.add(rolepms); } } this.saveBatch(list); } List<String> delete = getDiff(permissionIds,lastPermissionIds); if(delete!=null && delete.size()>0) { for (String permissionId : delete) { this.remove(new QueryWrapper<SysDepartPermission>().lambda().eq(SysDepartPermission::getDepartId, departId).eq(SysDepartPermission::getPermissionId, permissionId)); //删除部门权限时,删除部门角色中已授权的权限 List<SysDepartRole> sysDepartRoleList = sysDepartRoleMapper.selectList(new LambdaQueryWrapper<SysDepartRole>().eq(SysDepartRole::getDepartId,departId)); List<String> roleIds = sysDepartRoleList.stream().map(SysDepartRole::getId).collect(Collectors.toList()); if(roleIds != null && roleIds.size()>0){ departRolePermissionMapper.delete(new LambdaQueryWrapper<SysDepartRolePermission>().eq(SysDepartRolePermission::getPermissionId,permissionId)); } } } }
The text was updated successfully, but these errors were encountered:
scott
Sorry, something went wrong.
已修改
No branches or pull requests
版本号:3.5.4
前端版本:无限制
问题描述:
部门管理——>部门赋权——>修改保存部门权限。src/main/java/org/jeecg/modules/systemrvice/impl/SysDepartPermissionServiceImpl.java 第63行。这段代码是不是有问题,我们在线上复现。场景:A部门和B部门,如果同时有权限Z,当我取消A部门的权限Z的时候,B部门也被自动勾选掉。代码63行再删除权限的时候,没有添加对应角色或者部门的条件限制,直接删除了系统内包含此权限的所有部门角色权限关联关系。
截图&代码:
`
`
The text was updated successfully, but these errors were encountered: