Commit 00c32f2
feat(server): GET /auth/me/localization — tenant regional defaults for every user (#2122)
Phase 2a of unifying currency. The `localization` settings (currency/locale/
timezone) are gated to `setup.access`, and `discovery` is static/context-free —
so a regular user's client has no way to learn the tenant's default currency or
locale to format values consistently.
This adds `GET /api/v1/auth/me/localization`, returning the resolved
`{ currency, locale, timezone }` off the request ExecutionContext (the same
values #2119 wired in) to every AUTHENTICATED user — without the setup.access
gate on the underlying settings. A thin passthrough of `resolveCtx(c)`; the
ctx resolution itself is covered by resolve-execution-context tests.
Unblocks the objectui client (Phase 2): a LocalizationProvider can fetch this
once and feed a single currency/number formatter the tenant default + locale,
replacing ~20 ad-hoc per-site currency-resolution paths.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 70609af commit 00c32f2
2 files changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
721 | 740 | | |
722 | 741 | | |
723 | 742 | | |
| |||
0 commit comments