From 3fc0d8d3af27748e2f56b77ff468a84580f8f7d0 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Fri, 2 Feb 2024 13:41:09 +0200 Subject: [PATCH] RED-8187: disabled file analysis button for non-dossier members. --- .../components/file-actions/file-actions.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts b/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts index dfbfbf08d..9f9c97f09 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts @@ -73,6 +73,7 @@ export class FileActionsComponent implements OnChanges { isDossierOverviewList = false; isDossierOverviewWorkflow = false; isFilePreview = false; + canAnalyzeFile = false; tooltipPosition = IqserTooltipPositions.above; buttons: Action[]; @ViewChild(ExpandableFileActionsComponent) @@ -234,7 +235,7 @@ export class FileActionsComponent implements OnChanges { tooltipClass: 'small', icon: 'iqser:refresh', show: this.showReanalyseFilePreview, - disabled: this.file.isProcessing, + disabled: this.file.isProcessing || !this.canAnalyzeFile, helpModeKey: 'stop_analysis', }, { @@ -272,6 +273,7 @@ export class FileActionsComponent implements OnChanges { icon: 'iqser:refresh', show: this.showReanalyseDossierOverview, helpModeKey: 'stop_analysis', + disabled: !this.canAnalyzeFile, }, { id: 'toggle-analysis-btn', @@ -443,6 +445,7 @@ export class FileActionsComponent implements OnChanges { this.canToggleAnalysis = this._permissionsService.canToggleAnalysis(this.file, this.dossier); this.showToggleAnalysis = !!this.file.lastProcessed && this._permissionsService.showToggleAnalysis(this.dossier); this.toggleTooltip = this._toggleTooltip; + this.canAnalyzeFile = this._permissionsService.isDossierMember(this.dossier); this.showDelete = this._permissionsService.canSoftDeleteFile(this.file, this.dossier); this.showOCR = this._permissionsService.canOcrFile(this.file, this.dossier);