feat #467: separate column sensitivity policies

This commit is contained in:
devmrko
2026-06-25 22:36:33 +09:00
parent d6c7533edd
commit 4961083f06
18 changed files with 386 additions and 43 deletions

View File

@@ -3,6 +3,7 @@ package com.cloudhandson.vpdbackoffice.domain.permission;
public record AppRole(
long roleId,
String roleName,
String description
String description,
String maxSensitivityLevel
) {
}

View File

@@ -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;
}
}