towerops/lib/towerops_web/channels
Graham McIntire dc32e16c68
fix: allow cloud pollers to access devices from any organization
Cloud pollers (is_cloud_poller = true, organization_id = nil) were
being blocked from polling devices because verify_device_organization
was checking if the device's organization matched the agent's
organization.

Since cloud pollers don't belong to any organization (organization_id
is nil), they should be allowed to poll devices from any organization.

Changes:
- verify_device_organization now allows access if organization_id is nil
- This fixes "Device not in agent's organization" errors for cloud pollers

Error before:
  Device b7e8dd99-0b19-496d-97ae-9f2601d16464 not in agent's organization
2026-01-25 11:15:19 -06:00
..
agent_channel.ex fix: allow cloud pollers to access devices from any organization 2026-01-25 11:15:19 -06:00
agent_socket.ex Add Dialyzer typespecs to WebSocket agent code and Agents context 2026-01-17 10:37:27 -06:00