Admin Spec: Tenant Settings
Admin Spec: Tenant Settings
Section titled “Admin Spec: Tenant Settings”| Field | Value |
|---|---|
| Area | Admin → Settings (admin-only settings page) |
| Status | Stub — created from the 2026-06-10 decision to make timezone per-tenant. Awaiting sign-off. |
| Owner | TBD (Admin) |
| Contract | /contracts/admin/tenant-settings.yaml |
| Access | Admin only (PR-06). |
| Resolves | The shared week definition (Weekly Goals G2, Weekly Summary G1) + notifications digest timezone |
Per-tenant configuration. The first concrete need is timezone + week-start, which several features depend on (week boundaries, the “current week”, the Monday digest). It lives here so every feature reads one authoritative source instead of hardcoding.
1. Overview
Section titled “1. Overview”An admin-only settings page holding tenant-level configuration. v1 scope is the time and week model — the thing Weekly Goals, Weekly Summary, and Notifications all need to agree on. Designed to extend (branding, locale, feature flags) without reshaping.
2. Functional Requirements
Section titled “2. Functional Requirements”- FR-01 Admin-only; non-admins get no entry point and 403 on the API.
- FR-02 Configure the tenant timezone (IANA, e.g.
Europe/London). DefaultEurope/London(GMT/BST) for the first tenant. - FR-03 Configure the week-start day (default Monday). Defines Previous/This/Next week boundaries and the “most-recently-uncompleted week” logic.
- FR-04 Changes apply to all downstream week/timezone-dependent behaviour: the Weekly Goals board columns + rollover, the Weekly Summary default-week, and the timing of all scheduled digests/reminders.
- FR-05 A single tenant has exactly one settings record; reads are cheap (cached).
§A. Acceptance Criteria (stub)
Section titled “§A. Acceptance Criteria (stub)”| Ref | Criterion |
|---|---|
| FR-01 | A non-admin calling the settings write endpoint gets 403; the entry point is hidden. |
| FR-02/03 | Setting timezone/week-start persists and is returned on read for the caller’s tenant. |
| FR-04 | After changing week-start, the Weekly Goals board and Weekly Summary default-week compute against the new boundary. |
§B. Data Model
Section titled “§B. Data Model”| Entity | Fields | Notes |
|---|---|---|
| TenantSettings | tenantId (pk), timezone (IANA, default Europe/London), weekStartDay (default monday) | One per tenant. The canonical source for the week definition (was Weekly Goals G2 / Weekly Summary G1). Extensible for future settings. |
Tenant-scoped (PR-04). Read by features via a shared accessor, not duplicated.
§C. Clarifications Needed
Section titled “§C. Clarifications Needed”- Week-start granularity — is Monday-start sufficient for all tenants, or must arbitrary start days be supported? (Default Monday covers the current need.)
- Who can edit — admin-only assumed; confirm People Team is excluded.
- Future settings — branding, locale/date-format, feature flags are likely future tenants of this record; out of scope now, design left open.
Out of Scope (v1)
Section titled “Out of Scope (v1)”Everything beyond timezone + week-start (branding, locale, feature flags) — added later as demand lands.