feat(REQ-2300):字段展示处理
This commit is contained in:
parent
5b1b4c1b13
commit
bf3e2c71e1
@ -32,6 +32,7 @@ public class DataPermissionResponseExecutor {
|
||||
private static final Integer ATTRIBUTE_ISUNMASKABLE = 2;
|
||||
private static final Integer ATTRIBUTE_ISEDITABLE = 2;
|
||||
private static final String ATTRIBUTE_ADD_ALLOW_EDIT_PREFIX = "dp_allow_edit_";
|
||||
private static final String ATTRIBUTE_ADD_ALLOW_DISPLAY_PREFIX = "dp_allow_display_";
|
||||
|
||||
private final DataObjectApi dataObjectApi;
|
||||
|
||||
@ -103,12 +104,12 @@ public class DataPermissionResponseExecutor {
|
||||
ExamineDpColumnsResp.AttributePermissionBasicDTO basic = entry.getValue();
|
||||
if (dataNode.has(basic.getAttrCode())) {
|
||||
ObjectNode objectNode = (ObjectNode) dataNode;
|
||||
if (!ATTRIBUTE_ISUNMASKABLE.equals(basic.getIsUnmaskable())) {
|
||||
objectNode.remove(basic.getAttrCode());
|
||||
}
|
||||
if (Objects.nonNull(basic.getIsEditable())) {
|
||||
objectNode.put(ATTRIBUTE_ADD_ALLOW_EDIT_PREFIX + basic.getAttrCode(), ATTRIBUTE_ISEDITABLE.equals(basic.getIsEditable()));
|
||||
}
|
||||
if (Objects.nonNull(basic.getIsUnmaskable())) {
|
||||
objectNode.put(ATTRIBUTE_ADD_ALLOW_DISPLAY_PREFIX + basic.getAttrCode(), ATTRIBUTE_ISUNMASKABLE.equals(basic.getIsUnmaskable()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user