RED-8187: disabled file analysis button for non-dossier members.

This commit is contained in:
Nicoleta Panaghiu 2024-02-02 13:41:09 +02:00
parent a17522fa36
commit 3fc0d8d3af

View File

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