From 551445c5221a44e658bb0d578ec8e18629e992e0 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Thu, 7 Dec 2023 13:56:53 +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 1eae31008..49f32cfae 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({