Ver código fonte

数据权限

4.0
yaoq 2 anos atrás
pai
commit
0df91d874d
2 arquivos alterados com 8 adições e 0 exclusões
  1. +1
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/role/RoleHandler.java
  2. +7
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/role/RoleRightContent.java

+ 1
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/role/RoleHandler.java Ver arquivo

@@ -239,6 +239,7 @@ public class RoleHandler {
RoleRightContent rc = new RoleRightContent(role.getPrivilege());
Map<String,Map<String, Object>> data = rc.getDataRight(item.getId());

//遍历该菜单拥有的数据权限,再把已配置的菜单数据权限填充进去
for (String f : menu.getRightSet(BpmEnum.MenuRightType.DATA.value)) {
if (StringUtil.isEmpty(f)) continue;
SwMap row = new SwMap();


+ 7
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/role/RoleRightContent.java Ver arquivo

@@ -94,6 +94,13 @@ public class RoleRightContent {
return StringUtil.join(fields, ",");
}

/**
* @Author yaoq
* @Date 2022/9/23 17:53
* @Params
* @Return java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>
* @Description 根据菜单方案明细ID 获取 数据权限值:Map<权限类型,<Key,Value>>
*/
public Map<String, Map<String, Object>> getDataRight(long key) {
RoleRight right = getRoleRight(key);
if (right == null) return new HashMap<>();


Carregando…
Cancelar
Salvar