mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-15 00:32:47 -04:00
fix(network): open Wi-Fi password modal upfront for enterprise networks (#2414)
NetworkManager rejects AddConnection for 802-1x without a non-empty identity, so the new API v7 agent-prompt flow never reaches the SecretAgent for fresh enterprise connections. Fall back to the existing modal-upfront path (already wired to ask for username + password via requiresEnterprise) when modelData.enterprise, mirroring the legacy DMSService.apiVersion < 7 branch. Fixes #2358 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -644,6 +644,7 @@ Rectangle {
|
||||
wifiContent.menuOpen = true;
|
||||
networkContextMenu.currentSSID = modelData.ssid;
|
||||
networkContextMenu.currentSecured = modelData.secured;
|
||||
networkContextMenu.currentEnterprise = modelData.enterprise;
|
||||
networkContextMenu.currentConnected = wifiDelegate.isConnected;
|
||||
networkContextMenu.currentSaved = modelData.saved;
|
||||
networkContextMenu.currentSignal = modelData.signal;
|
||||
@@ -744,7 +745,7 @@ Rectangle {
|
||||
event.accepted = true;
|
||||
return;
|
||||
}
|
||||
if (modelData.secured && !modelData.saved && DMSService.apiVersion < 7) {
|
||||
if (modelData.secured && !modelData.saved && (DMSService.apiVersion < 7 || modelData.enterprise)) {
|
||||
PopoutService.showWifiPasswordModal(modelData.ssid);
|
||||
} else {
|
||||
NetworkService.connectToWifi(modelData.ssid);
|
||||
@@ -762,6 +763,7 @@ Rectangle {
|
||||
|
||||
property string currentSSID: ""
|
||||
property bool currentSecured: false
|
||||
property bool currentEnterprise: false
|
||||
property bool currentConnected: false
|
||||
property bool currentSaved: false
|
||||
property int currentSignal: 0
|
||||
@@ -802,7 +804,7 @@ Rectangle {
|
||||
NetworkService.disconnectWifi();
|
||||
return;
|
||||
}
|
||||
if (networkContextMenu.currentSecured && !networkContextMenu.currentSaved && DMSService.apiVersion < 7) {
|
||||
if (networkContextMenu.currentSecured && !networkContextMenu.currentSaved && (DMSService.apiVersion < 7 || networkContextMenu.currentEnterprise)) {
|
||||
PopoutService.showWifiPasswordModal(networkContextMenu.currentSSID);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1324,6 +1324,10 @@ Item {
|
||||
NetworkService.disconnectWifi();
|
||||
return;
|
||||
}
|
||||
if (modelData.secured && !modelData.saved && (DMSService.apiVersion < 7 || modelData.enterprise)) {
|
||||
PopoutService.showWifiPasswordModal(modelData.ssid);
|
||||
return;
|
||||
}
|
||||
NetworkService.connectToWifi(modelData.ssid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user