获取角色列表剔除隐藏角色

This commit is contained in:
anhc 2022-07-04 21:42:06 +08:00
parent 4c910646e5
commit ca89f1a428
2 changed files with 6 additions and 0 deletions

View File

@ -644,6 +644,7 @@ public class CooperationWeb extends ActionWeb {
}
List<CooperationRoleDto> dtoList = new ArrayList<>();
List<CoeCooperationRoleModel> list = api.queryCooperationRoleList(teamId);
boolean isOlderVersion = SDK.getAppAPI().getPropertyBooleanValue("com.actionsoft.apps.coe.pal", "IsOlderVersion", true);
for (CoeCooperationRoleModel role : list) {
CooperationRoleDto dto = new CooperationRoleDto();
dto.setRoleId(role.getId());
@ -654,11 +655,16 @@ public class CooperationWeb extends ActionWeb {
"&#xe615;" : role.getRoleType() == CoeCooperationConst.ROLE_TYPE_DESIGNER ?
"&#xe729;" : role.getRoleType() == CoeCooperationConst.ROLE_TYPE_VISITOR ?
"&#xe60e;" : "&#xe625;");
//新版权限隐藏隐式用户角色
if (!isOlderVersion && role.getIsUser() == 1){
continue;
}
dtoList.add(dto);
}
ResponseObject ro = ResponseObject.newOkResponse();
ro.put("roleData", JSON.toJSON(dtoList));
ro.put("roleIds", roleIds);
ro.put("isOlderVersion", isOlderVersion);
return ro.toString();
}