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);