RED-10330: fixed remove in this context option permissions.

This commit is contained in:
Nicoleta Panaghiu 2024-11-01 10:24:53 +02:00
parent d150fe6f80
commit af5adade4d
2 changed files with 5 additions and 6 deletions

View File

@ -16,11 +16,7 @@ export const canForceRedaction = (annotation: AnnotationWrapper, canAddRedaction
export const canAcceptRecommendation = (annotation: AnnotationWrapper) => annotation.isRecommendation && !annotation.pending;
export const canMarkAsFalsePositive = (annotation: AnnotationWrapper, annotationEntity: Dictionary) =>
annotation.canBeMarkedAsFalsePositive &&
!annotation.hasBeenResizedLocally &&
!annotation.isRemovedLocally &&
!annotation.hasBeenForcedRedaction &&
annotationEntity?.hasDictionary;
annotation.canBeMarkedAsFalsePositive && !annotation.hasBeenResizedLocally && annotationEntity?.hasDictionary;
export const canRemoveOnlyHere = (annotation: AnnotationWrapper, canAddRedaction: boolean, autoAnalysisDisabled: boolean) =>
canAddRedaction &&

View File

@ -109,7 +109,10 @@ export class AnnotationWrapper implements IListable {
get canBeMarkedAsFalsePositive() {
return (
(this.isRecommendation || this.superType === SuperTypes.Redaction || (this.isSkipped && this.isDictBased)) &&
(this.isRecommendation ||
this.superType === SuperTypes.Redaction ||
(this.isSkipped && this.isDictBased) ||
(this.isRemovedLocally && this.isDictBased)) &&
!this.isImage &&
!this.imported &&
!this.pending &&