Enforce claim beneficiary access and retire unused legacy APIs

This commit is contained in:
SepehrYahyaee
2026-10-05 14:39:51 +03:30
parent 0735333467
commit a3f9aab8fb
104 changed files with 6864 additions and 13223 deletions
+5 -8
View File
@@ -36,10 +36,6 @@ export class FanavaranLocationService {
return ids;
}
primaryLocationId(locations?: LocationEntry[] | null): string | undefined {
return this.extractLocationIds(locations)[0];
}
/**
* Maker primary location → reviewer primary → tenant auth.location.
* Non-parsian or non-FileMaker flows always use the tenant default.
@@ -57,7 +53,10 @@ export class FanavaranLocationService {
return defaultLocation;
}
const makerLocation = await this.loadPrimaryLocationId(input.fileMakerId, "maker");
const makerLocation = await this.loadPrimaryLocationId(
input.fileMakerId,
"maker",
);
if (makerLocation) {
this.logger.debug(
`Fanavaran Location from file-maker id=${input.fileMakerId} → ${makerLocation}`,
@@ -155,9 +154,7 @@ export class FanavaranLocationService {
);
}
if (!caseBranchId || caseBranchId !== reviewerBranchId) {
throw new ForbiddenException(
"This file belongs to another branch.",
);
throw new ForbiddenException("This file belongs to another branch.");
}
}