Merge branch 'RED-5870' into 'master'

RED-5870: Enable force redaction of hints

Closes RED-5870

See merge request redactmanager/redaction-service!408
This commit is contained in:
Maverick Studer 2024-05-23 10:47:30 +02:00
commit f23e726c5c
2 changed files with 10 additions and 3 deletions

View File

@ -110,7 +110,7 @@ public class ManualChangeOverwrite {
} }
if (manualChange instanceof ManualRedactionEntry manualRedactionEntry) { if (manualChange instanceof ManualRedactionEntry manualRedactionEntry) {
setToApplied(); setToAppliedIfNotHint();
legalBasis = manualRedactionEntry.getLegalBasis(); legalBasis = manualRedactionEntry.getLegalBasis();
} }
@ -158,7 +158,7 @@ public class ManualChangeOverwrite {
} }
private void setToApplied() { private void setToAppliedIfNotHint() {
removed = false; removed = false;
ignored = false; ignored = false;
@ -167,6 +167,13 @@ public class ManualChangeOverwrite {
} }
} }
private void setToApplied() {
removed = false;
ignored = false;
applied = true;
}
public void addChange(BaseAnnotation manualChange) { public void addChange(BaseAnnotation manualChange) {

View File

@ -184,7 +184,7 @@ public class ManualChangesUnitTest extends BuildDocumentIntegrationTest {
.legalBasis("coolio") .legalBasis("coolio")
.build(); .build();
entity.getManualOverwrite().addChange(forceRedaction); entity.getManualOverwrite().addChange(forceRedaction);
assertFalse(entity.applied()); assertTrue(entity.applied());
assertFalse(entity.ignored()); assertFalse(entity.ignored());
assertFalse(entity.removed()); assertFalse(entity.removed());
assertEquals(reason + ", removed by manual override, forced by manual override", entity.buildReasonWithManualChangeDescriptions()); assertEquals(reason + ", removed by manual override, forced by manual override", entity.buildReasonWithManualChangeDescriptions());