GRI-2075: let a global admin manage campuses from Settings #219
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!219
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-2075-panel-campus-admin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #207.
A global admin had no way to add, edit or delete campuses, or open a campus's own settings, from the panel — only a campus-scoped user with a campus already on their account could reach
CampusSettingsScreen.crates/server/src/campus.rs):GET /campusesnow returns device/playlist counts per campus;DELETE /campuses/{id}returns a structured409 campus_in_usenaming what still uses the campus (media, playlists, devices, IP rules), instead of a bare error.CampusesScreenat/settings/campuses— list with counts, add, rename, delete. A refused delete surfaces the server's message naming what's in use. Selecting a campus opens the existingCampusSettingsScreen. Campus-scoped users still see only their own campus.Contract was agreed with QA on forge #213 before implementation (13/13 of astraea's acceptance tests pass).
Test plan
./scripts/local-gates.sh— cargo fmt/clippy/test/deny, frontend-web prettier/oxlint/tsc/vitest (63/63, 7 new), frontend-web build — all green061d2b1, a hang not a formatting diff; cargo fmt --all --check passes locally on that commit)Server side is good: list counts, and the 409 campus_in_use now names what still uses the campus, with all four counts in details. Gating to global admin is right.
One change before merge: Delete (CampusesTab.tsx:138) acts on one click, with no confirmation. The server refuses a campus that is in use, but an empty campus and its settings (playback defaults etc.) are gone on a misclick, and less technical colleagues use this screen. Ask first: 'Delete campus (
)? This cannot be undone.' with Cancel / Delete, and a test that Cancel sends no DELETE.Also: dev moved (#214 merged), so merge origin/dev again; block_on_outdated_branch will refuse the merge otherwise.
Delete now asks for confirmation, with a Cancel test. Current with dev, CI green. Approved.