Devices: allow setting a device back to All campuses #323
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage#323
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Product owner, panel test on 10.4.80.205 (dev
56dd99c), 2026-11-18 — screenshot on GRI-2051.What he sees: on the Devices screen, a device that already has a campus cannot be set back to All campuses (no campus). The campus list offers only real campuses; "Choose a campus" is disabled. Media items can be set to All campuses (#242), devices cannot.
Cause — server and panel both:
PATCH /devices/{id}(crates/server/src/devices/handlers.rs) readscampus_idasOption<Uuid>, so an absent field andnullare the same thing: "leave the campus as it is". There is no way to say "clear it".DevicesScreen.tsx:357-371: the select's empty option isdisabled, andonChangeignores an empty value.assignDeviceCampusinhttpDevicesApi.tsalways sends a campus id.Wanted:
campus_idbecomes three-state: absent = unchanged,null= no campus, a uuid = that campus (serdeOption<Option<Uuid>>withdeserialize_with/double_option, or an explicit field).null.campus_id: null.Done when:
campus_id: nullclears it; absent field leaves it; campus admin gets 403 onnull; a device on a campus playlist can still be cleared.null; a campus admin does not see it.Merged in #328 (server:
campus_id: nullclears, 403 for a campus-bound caller; panel: All campuses option). CI 7/7 required green, up to date with dev.Follow-up nit, not blocking: the panel offers All campuses when
user.isAdmin, but the server refuses when the caller has a campus. An admin-group user bound to a campus sees the option and gets a 403. Should beuser.isAdmin && user.campusId === null.Done: #328 (server + panel) and #329 (option hidden for campus-bound admins) are in dev
bf59402. Deploy to 10.4.80.205 follows when dev CI is green.