42f2a41ff6a233e6db2652d2038acfd1c4cd7acd
Two halves of the same thing. A client login was already pinned to its own tenant on most reads, but the roster, the B2C customer list and the dashboard counters were not — a DailyGrubs login listed the whole network's riders. The other half was missing entirely: Doormile's own staff had no way to look at one client's slice. Reports accepted ?tenantid= but applied it only to the consignment count, and bookings accepted it while milers, customers, consignments and the dashboard ignored it. effectiveTenantID(c) now resolves both cases in one place — the caller's own tenant for a client login, the requested one for Doormile staff, 0 for the whole network. A client asking for someone else's tenantid is refused rather than silently handed their own data back under the wrong label. Applied to: milers, customers, bookings, consignments, dashboard, reports and the rider summary. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
No description provided
Languages
Go
94.8%
PLpgSQL
4%
Python
1.1%
Dockerfile
0.1%