Commit 418b6625 by guojuxing

权限项操作修复

parent 6bdd8f10
......@@ -927,6 +927,11 @@ public class MenuApiServiceImpl implements MenuApiService {
if (tabSysUser == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "用户不存在");
}
//添加逻辑:如果是超级管理员,直接全部有效,不存在没有权限的操作项
if (tabSysUser.getSuperAdmin().intValue() == 1) {
return ServiceResponse.success(new ArrayList<>());
}
//用户拥有的菜单权限
List<TabSysMenu> menuList = getUserMenuList(userId);
......@@ -960,6 +965,7 @@ public class MenuApiServiceImpl implements MenuApiService {
//获取配置在权限项内的操作项数据
List<MenuDTO> operationItemListOfAuthItem = getOperationItemOfAuthItem();
//已配置的操作项需要权限控制
//当时超级管理员的时候,operationItemMap是没有值的,因此会一直有效。
if (CollectionUtils.isNotEmpty(operationItemListOfAuthItem)) {
for (MenuDTO menuDTO : operationItemListOfAuthItem) {
if (!operationItemMap.containsKey(menuDTO.getMenuId()) || StringUtils.isBlank(versionCode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment