feat #467: separate column sensitivity policies
This commit is contained in:
@@ -3,6 +3,7 @@ package com.cloudhandson.vpdbackoffice.domain.permission;
|
||||
public record AppRole(
|
||||
long roleId,
|
||||
String roleName,
|
||||
String description
|
||||
String description,
|
||||
String maxSensitivityLevel
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,10 +5,19 @@ public record ProtectedColumn(
|
||||
long objectId,
|
||||
String columnName,
|
||||
String sensitiveYn,
|
||||
Long visibleRoleId
|
||||
Long visibleRoleId,
|
||||
String sensitivityLevel,
|
||||
String redactionMethod
|
||||
) {
|
||||
|
||||
public boolean sensitive() {
|
||||
return "Y".equalsIgnoreCase(sensitiveYn);
|
||||
return "Y".equalsIgnoreCase(sensitiveYn)
|
||||
|| !"PUBLIC".equalsIgnoreCase(sensitivityLevel);
|
||||
}
|
||||
|
||||
public String policyLabel() {
|
||||
String level = sensitivityLevel == null || sensitivityLevel.isBlank() ? "PUBLIC" : sensitivityLevel;
|
||||
String method = redactionMethod == null || redactionMethod.isBlank() ? "NONE" : redactionMethod;
|
||||
return level + "/" + method;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user