Fixed file maker view files error

This commit is contained in:
SepehrYahyaee
2026-07-14 13:52:12 +03:30
parent 168e52a475
commit aec9e76918

View File

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