The Enterprise Report, the Regional Report, the Branch Report and My
Production are the same report with sections removed and the title
swapped, which is why there is one path rather than four.
The scope is resolved from identity and cannot be requested. An
enterprise admin on the corporate team gets the rollup with every
branch, grouped by company in branchGroups; a company admin gets their
company plus the branches assigned to it; a branch admin gets their own
branch and no sibling appears in it, by name or by figure; a loan
officer gets their own production plus a myLoans table and no
loan-officer comparison. branchIds INTERSECTS with what the caller can
already see, so it narrows and never widens.
sections says which parts the client should draw, so the rule about
who sees the branch rollup lives in one place rather than in each
client's template.
A user-scoped bearer token acts as its user, so it gets exactly the
report that user would get on the token's team. A team-scoped token (no
user) and a team without the Lender industry get a 404.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
200Lender report scoped to the authenticated user and team
404Not on the Lender industry
