forked from Yara724/api
Merge pull request 'Fixed file maker view files error' (#189) from s.yahyaee/yara724-api:main into main
Reviewed-on: Yara724/api#189
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user