RED-7400: fixed error of breaking redaction log with removing engine-check for resize redactions #68
@ -103,6 +103,7 @@ public class RedactionLogMergeService {
|
||||
if (excludedPages != null && !excludedPages.isEmpty()) {
|
||||
entry.getPositions().forEach(pos -> {
|
||||
if (!entry.isLocalManualRedaction() && excludedPages.contains(pos.getPage())) {
|
||||
// if (!isLocalManualRedaction(entry.getManualChanges()) && excludedPages.contains(pos.getPage())) {
|
||||
entry.setExcluded(true);
|
||||
}
|
||||
});
|
||||
@ -131,6 +132,12 @@ public class RedactionLogMergeService {
|
||||
return redactionLog;
|
||||
}
|
||||
|
||||
// private boolean isLocalManualRedaction(List<ManualChange> manualChanges) {
|
||||
//
|
||||
// return manualChanges != null && manualChanges.stream()
|
||||
// .anyMatch(mc -> (mc.getManualRedactionType() == ManualRedactionType.ADD_LOCALLY || mc.getManualRedactionType() == ManualRedactionType.RESIZE) && mc.getAnnotationStatus() == AnnotationStatus.APPROVED);
|
||||
// }
|
||||
|
||||
|
||||
private List<ManualRedactionWrapper> createManualRedactionWrappers(ManualRedactions manualRedactions) {
|
||||
|
||||
|
||||
@ -87,8 +87,7 @@ public class RedactionLogEntry {
|
||||
public boolean isLocalManualRedaction() {
|
||||
|
||||
return manualChanges != null && manualChanges.stream()
|
||||
.anyMatch(mc -> mc.getManualRedactionType() == ManualRedactionType.ADD_LOCALLY && mc.getAnnotationStatus() == AnnotationStatus.APPROVED
|
||||
|| mc.getManualRedactionType() == ManualRedactionType.RESIZE && mc.getAnnotationStatus() == AnnotationStatus.APPROVED && engines.contains(Engine.RULE) && !engines.contains(Engine.DICTIONARY));
|
||||
.anyMatch(mc -> (mc.getManualRedactionType() == ManualRedactionType.ADD_LOCALLY || mc.getManualRedactionType() == ManualRedactionType.RESIZE) && mc.getAnnotationStatus() == AnnotationStatus.APPROVED);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user