From 52ea6fa92d412fb335becc93ac4ceeb9023c7358 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Wed, 13 Dec 2023 12:23:07 +0200 Subject: [PATCH] RED-8072 - Do not allow any annotations or annotation changes while auto-analysis is disabled --- .../file-preview/services/pdf-annotation-actions.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts b/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts index 157a7e963..f967c3f73 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts @@ -73,21 +73,21 @@ export class PdfAnnotationActionsService { availableActions.push(editButton); } - if (permissions.canAcceptRecommendation) { + if (permissions.canAcceptRecommendation && annotationChangesAllowed) { const acceptRecommendationButton = this.#getButton('check', _('annotation-actions.accept-recommendation.label'), () => this.#annotationActionsService.convertRecommendationToAnnotation(annotations), ); availableActions.push(acceptRecommendationButton); } - if (permissions.canForceRedaction) { + if (permissions.canForceRedaction && annotationChangesAllowed) { const forceRedactionButton = this.#getButton('thumb-up', _('annotation-actions.force-redaction.label'), () => this.#annotationActionsService.forceAnnotation(annotations), ); availableActions.push(forceRedactionButton); } - if (permissions.canForceHint) { + if (permissions.canForceHint && annotationChangesAllowed) { const forceHintButton = this.#getButton('thumb-up', _('annotation-actions.force-hint.label'), () => this.#annotationActionsService.forceAnnotation(annotations, true), );