Skip to content

GET /auth/me/localization answers currency: null / timezone: null for every authenticated caller — the current-user resolver assembles no localization #15387

Description

@os-justin

Found while executing #14788 (PR #15386), out of that card's scope (the ruling touched locale only; currency / timezone were to stay unchanged — and they are unchanged, which is the defect).

What

packages/plugins/plugin-hono-server/src/current-user-endpoints.ts — the /auth/me/localization handler returns currency: execCtx.currency ?? null and timezone: execCtx.timezone ?? null, and its comment says the resolved regional defaults "ride on the request ExecutionContext (ADR-0053)". But the context these endpoints resolve comes from makeExecutionContextResolver in the same file, which returns { userId, tenantId, email, positions, permissions, systemPermissions, tabPermissions, posture, isSystem, org_user_ids, accessible_org_ids } — no timezone, no currency (and, before PR #15386, no locale). The dispatcher's shared assembler (packages/core/src/security/assemble-execution-context.ts) is what fills those three from resolveLocalizationContext; this resolver never calls it.

So for every authenticated caller the endpoint answers currency: null, timezone: null, whatever the localization settings say. objectui reads currency off this endpoint (apps/console/src/languageSeed.ts, LocalizationFetchProvider.tsx) — the console's regional formatting seed is fed nulls.

Re-check

Likely fix (plugin-hono-server, domain:cli)

Resolve resolveLocalizationContext({ ql, settings, tenantId, userId }) (already imported for the locale rung since #14788) once in the handler and answer currency / timezone from it, so the endpoint's timezone / currency derive from the same cascade the dispatcher's execCtx uses. Pin the two values the way #14788 pinned locale. Whether docs/qa/platform-checklist/areas/access-security.json ("nulls legal") should keep saying nulls are legal is for the fixer to decide.

Blocked-by: none. Related: #14788, PR #15386, ADR-0053.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions