Instead of disarming all sectors, the AlarmDevice disarms only the currently activated sector. This change is a no-op for users as it is expected that disarming activated sectors is the same as disarming all. Instead, it's a fix for all users that have accounts with limited permissions and multiple areas, that can't use the disarm all (see #123).
A race condition may be introduced with this change if:
Sectors 1, 2 are activated
The device updates the internal state and 1, 2 are now considered activated
From an external tool (e.g. BrowserOne or web UI) we enable also sector 3
We immediately disarm the system before the device updates the internal state
This race condition is an edge case that we consider negligible as it requires too many steps. Furthermore, the device will update the state anyway, going back to an armed state that can disable the sector 3.
Testing:
Arm and disarm a system.
Extra Notes (optional):
n/a
Checklist
[x] Related issues and proposed changes are filled
[x] Tests are defining the correct and expected behavior
Related Issues
Proposed Changes:
Instead of disarming all sectors, the
AlarmDevice
disarms only the currently activated sector. This change is a no-op for users as it is expected that disarming activated sectors is the same as disarming all. Instead, it's a fix for all users that have accounts with limited permissions and multiple areas, that can't use the disarm all (see #123).A race condition may be introduced with this change if:
This race condition is an edge case that we consider negligible as it requires too many steps. Furthermore, the device will update the state anyway, going back to an armed state that can disable the sector 3.
Testing:
Arm and disarm a system.
Extra Notes (optional):
n/a
Checklist