forked from Yara724/api
Enforce claim beneficiary access and retire unused legacy APIs
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user