GRI-1896: device groups claim devices by a name rule #140

Merged
vivy merged 2 commits from feature/GRI-1896-device-groups into dev 2026-11-11 15:04:09 +00:00
Owner

Part of #35. GRI-1896.

What

crates/server/src/groups.rs: a DeviceGroup with an optional NameRule (StartsWith, EndsWith, Contains, Regex). DeviceGroup::claims(name) says whether a device with that name is in the group by rule. NameRule::is_valid refuses a regular expression that does not parse, so the panel can refuse it before saving (plan/server/enrolment.md, "Device groups").

A group without a rule is a manual group and claims nothing by name.

Test

a_device_named_lobby_03_joins_the_lobby_group_by_the_starts_with_rule is the "done when" line of #35. Five more cover a non-match, manual placement, a regex match and an invalid regex.

New dependency

regex = "1" (MIT/Apache-2.0). cargo deny passes.

Not in this PR

No table, no API and no playlist-to-group assignment yet. #35 stays open for those.

Local --rust-only gates: all green.

Part of #35. GRI-1896. ## What `crates/server/src/groups.rs`: a `DeviceGroup` with an optional `NameRule` (`StartsWith`, `EndsWith`, `Contains`, `Regex`). `DeviceGroup::claims(name)` says whether a device with that name is in the group by rule. `NameRule::is_valid` refuses a regular expression that does not parse, so the panel can refuse it before saving (plan/server/enrolment.md, "Device groups"). A group without a rule is a manual group and claims nothing by name. ## Test `a_device_named_lobby_03_joins_the_lobby_group_by_the_starts_with_rule` is the "done when" line of #35. Five more cover a non-match, manual placement, a regex match and an invalid regex. ## New dependency `regex = "1"` (MIT/Apache-2.0). `cargo deny` passes. ## Not in this PR No table, no API and no playlist-to-group assignment yet. #35 stays open for those. Local `--rust-only` gates: all green.
GRI-1896: device groups claim devices by a name rule (starts with, ends with, contains, regex)
Some checks failed
CI / the pre-push hook (pull_request) Successful in 7s
CI / cargo fmt (pull_request) Successful in 14s
CI / cargo deny (pull_request) Successful in 31s
CI / cargo deny advisories (pull_request) Failing after 34s
CI / cargo clippy (pull_request) Successful in 10m13s
CI / repository boundary (pull_request) Successful in 11s
CI / cargo test (pull_request) Successful in 12m43s
CI / frontend-web (pull_request) Failing after 15m6s
CI / CI (pull_request) Failing after 13s
CI / Notify gate failed (pull_request) Successful in 6s
0b32f78dbb
Merge remote-tracking branch 'origin/dev' into feature/GRI-1896-device-groups
Some checks failed
CI / the pre-push hook (pull_request) Successful in 32s
CI / cargo fmt (pull_request) Successful in 45s
CI / cargo clippy (pull_request) Successful in 2m14s
CI / cargo deny (pull_request) Successful in 2m15s
CI / cargo deny advisories (pull_request) Failing after 1m22s
CI / repository boundary (pull_request) Successful in 46s
CI / frontend-web (pull_request) Successful in 2m6s
CI / cargo test (pull_request) Successful in 5m41s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Failing after 10m58s
caa9f163c0
vivy merged commit 112d945cc4 into dev 2026-11-11 15:04:09 +00:00
vivy deleted branch feature/GRI-1896-device-groups 2026-11-11 15:04:11 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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!140
No description provided.