From aec9e769186b855b281275178dfa4149f886798c Mon Sep 17 00:00:00 2001 From: SepehrYahyaee <7heycallmegray@gmail.com> Date: Tue, 14 Jul 2026 13:52:12 +0330 Subject: [PATCH] Fixed file maker view files error --- src/expert-claim/expert-claim.service.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/expert-claim/expert-claim.service.ts b/src/expert-claim/expert-claim.service.ts index 8262187..7542d8c 100644 --- a/src/expert-claim/expert-claim.service.ts +++ b/src/expert-claim/expert-claim.service.ts @@ -4692,8 +4692,8 @@ export class ExpertClaimService { const isFactorValidationPending = claimIsAwaitingExpertFactorValidationV2(claim); - // FileMaker: can only view V5 files (requiresFileMakerApproval: true) that they created. - // V4 files do not require FileMaker approval and must not appear in their panel. + // FileMaker: can view any file they created (both during filing and approval phase). + // The list endpoint already filters to V5-only; detail access is scoped by ownership. if (actor.role === RoleEnum.FILE_MAKER) { const isOwn = claimCaseInitiatedByFieldExpert(claim, actor, linkedBlame); if (!isOwn) { @@ -4701,11 +4701,6 @@ export class ExpertClaimService { "FileMakers can only view files they created.", ); } - if (!(claim as any).requiresFileMakerApproval) { - throw new ForbiddenException( - "This file does not require FileMaker approval.", - ); - } // Fall through to the detail build below } else if ( // Field experts and FileReviewers can view IN_PERSON expert-initiated claims