From 427dfa23e8a5e796d3d7ece564cc2b270475bca2 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Thu, 7 Dec 2023 13:54:15 +0200 Subject: [PATCH] DM-588 - Do not allow any annotations or annotation changes while auto-analysis is disabled --- .../file-preview/services/pdf-proxy.service.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts index dcecc5cca..817a66ded 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts @@ -184,13 +184,15 @@ export class PdfProxyService { } if (this._iqserPermissionsService.has(Roles.redactions.write)) { - popups.push({ - type: 'actionButton', - dataElement: TextPopups.REDACT_TEXT, - img: this.#addRedactionIcon, - title: this.#getTitle(ManualRedactionEntryTypes.REDACT), - onClick: () => this._ngZone.run(() => this.#redactText(ManualRedactionEntryTypes.REDACT)), - }); + if (!(this.#isDocumine && this._state.file().excludedFromAutomaticAnalysis)) { + popups.push({ + type: 'actionButton', + dataElement: TextPopups.REDACT_TEXT, + img: this.#addRedactionIcon, + title: this.#getTitle(ManualRedactionEntryTypes.REDACT), + onClick: () => this._ngZone.run(() => this.#redactText(ManualRedactionEntryTypes.REDACT)), + }); + } if (!this.#isDocumine) { popups.push({