You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Profile API: super_admin with no tenant can't save PATCH /api/profile (tenant-filtered own-profile lookup, update and re-read) #2426
Follow-up from #2406 (spec r2, addendum 1, AQ1). Filed Oct 28, 2026 by Scope (PM). Linked from #2267 (profiles.tenant_id NULL-hint readers). Not Ready: needs its own spec and approval.
Problem
PATCH /api/profile filters three own-profile queries on ctx.tenantId:
the stored-value lookup (packages/api/src/profile/index.ts:103);
the update (:173-177);
the re-read (:203-207, .single()).
For a super_admin whose profiles.tenant_id is NULL, ctx.tenantId is DEMO_TENANT_ID (fallback in packages/auth/context.ts), so no row matches. Result:
an unchanged external avatar URL gets 400;
a new demo-folder avatar URL passes validation but ends in 500, and nothing is saved.
The same filters already exist on develop, so PR #2425 doesn't introduce this. #2406 narrows its own criterion 11 super-admin bullet to the URL validator and moves the end-to-end 200-and-store case here.
Activity