networkmodel: fix case when NM D-Bus `GetSettings` returns empty connection
Short description
NM D-Bus GetSettings
:
qdbus --system --literal org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Settings/1 org.freedesktop.NetworkManager.Settings.Connection.GetSettings
can return empty connection if user has no permission to perform this operation (for example, if this connection is not public).
So, we need read public settings (id, name, type) from ActiveConnection
object.
Current behaviour
And for example, if you connect to non-public (not for all users) Wi-Fi under one userA
, and then switch to another userB
, then there is a bug when the Wi-Fi widget displays as if we are connected to all Wi-Fi at the same time (all Wi-Fi connections is active).
Expected behaviour
userB
should only see an active connection in the widget, but should not be able to turn it off or change it.