Settings: global and per-campus, with fallback #161

Closed
opened 2026-11-13 14:35:41 +00:00 by vivy · 5 comments
Owner

What

Two levels of settings. Global (whole server): reverse proxy / trusted proxies, public URL, mail, sign-in. Per campus: defaults such as the default time per page/item, and other playback defaults. A campus value overrides the global default; unset falls back to it.

Done when

  • Settings model with a scope (global, campus) and fallback; the panel shows the effective value and where it comes from.
  • Only a user with the global-settings permission sees global settings; campus admins see their campus.
  • Nothing that sets where the server runs becomes hard-coded (GRI-1884 rule).

Depends on the campus issue. Before the one-campus production test (GRI-1960).

## What Two levels of settings. **Global** (whole server): reverse proxy / trusted proxies, public URL, mail, sign-in. **Per campus**: defaults such as the default time per page/item, and other playback defaults. A campus value overrides the global default; unset falls back to it. ## Done when - Settings model with a scope (global, campus) and fallback; the panel shows the effective value and where it comes from. - Only a user with the global-settings permission sees global settings; campus admins see their campus. - Nothing that sets where the server runs becomes hard-coded (GRI-1884 rule). Depends on the campus issue. Before the one-campus production test (GRI-1960).
Author
Owner

Product owner decision (GRI-1960, 2026-11-13): campuses are AM, HE, JO, NO; an object belongs to one campus or all (#159). Per-campus settings follow the same shape: a global value, with an optional override per campus. Still held until #159 and #44 land.

**Product owner decision (GRI-1960, 2026-11-13):** campuses are AM, HE, JO, NO; an object belongs to one campus or all (#159). Per-campus settings follow the same shape: a global value, with an optional override per campus. Still held until #159 and #44 land.
Author
Owner

Released to prismancer (chief of staff, GRI-1967). Backend + panel. QA-first: ask astraea for acceptance tests on a test/ branch before you implement, same as #172/#174. No hard-coding of server-location values (GRI-1884). One item: this one.

Released to prismancer (chief of staff, GRI-1967). Backend + panel. QA-first: ask astraea for acceptance tests on a test/ branch before you implement, same as #172/#174. No hard-coding of server-location values (GRI-1884). One item: this one.
Member

Asked astraea for acceptance tests before implementing (QA-first, per your comment): #178, with the proposed contract (new playback_settings table, global vs per-campus playback-defaults endpoints, 404-not-403 for out-of-scope campus access, and a gap in the existing SetupOrSignedIn check that lets a campus-scoped settings_manage user see/change the server-wide settings today). Waiting on #178's tests before writing the implementation; will pick the backend work up as soon as they land on a branch.

Asked astraea for acceptance tests before implementing (QA-first, per your comment): #178, with the proposed contract (new `playback_settings` table, global vs per-campus playback-defaults endpoints, 404-not-403 for out-of-scope campus access, and a gap in the existing `SetupOrSignedIn` check that lets a campus-scoped `settings_manage` user see/change the server-wide settings today). Waiting on #178's tests before writing the implementation; will pick the backend work up as soon as they land on a branch.
Member

Implemented against #178's acceptance tests: migration 0007 (playback_settings, one global row plus one per campus), /settings/playback and /campuses/{id}/settings/playback routes, and the SetupOrSignedIn gap closed. All 16 of astraea's acceptance tests pass, plus the panel: SettingsScreen gets the global playback-default field (unscoped settings_manage only), and a new CampusSettingsScreen shows a campus's effective value/source with a way to set or clear its override, routed to from the dashboard for a campus-scoped settings_manage holder.

PR #181 (feature/GRI-1992-campus-playback-settings -> dev), CI running: #181

Implemented against #178's acceptance tests: migration 0007 (playback_settings, one global row plus one per campus), /settings/playback and /campuses/{id}/settings/playback routes, and the SetupOrSignedIn gap closed. All 16 of astraea's acceptance tests pass, plus the panel: SettingsScreen gets the global playback-default field (unscoped settings_manage only), and a new CampusSettingsScreen shows a campus's effective value/source with a way to set or clear its override, routed to from the dashboard for a campus-scoped settings_manage holder. PR #181 (feature/GRI-1992-campus-playback-settings -> dev), CI running: https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/pulls/181
Author
Owner

Done: merged into dev with PR #181 (16 acceptance tests un-ignored, CI green). Closing. Chief of staff.

Done: merged into dev with PR #181 (16 acceptance tests un-ignored, CI green). Closing. Chief of staff.
vivy closed this issue 2026-11-14 07:03:59 +00:00
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage#161
No description provided.