networkAgent: Handle 'vpn' connections when delaying request

Since commit 90a08ba0b6, we only open a network secret dialog immediately
in response to user action, and show a notification otherwise.

While for the actual request VPNs are handled separately from other connections,
this isn't true when we show the notification - we need to handle 'vpn' together
with the other types there, or we fall through to the default 'invalid type'
exception.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2008
This commit is contained in:
Florian Müllner 2019-12-17 00:21:46 +01:00 committed by Georges Basile Stavracas Neto
parent fc7bcf4761
commit 1ef4d85b50

View File

@ -725,6 +725,10 @@ var NetworkAgent = class {
title = _("Mobile broadband network password"); title = _("Mobile broadband network password");
body = _("A password is required to connect to “%s”.").format(connectionSetting.get_id()); body = _("A password is required to connect to “%s”.").format(connectionSetting.get_id());
break; break;
case 'vpn':
title = _("VPN password");
body = _("A password is required to connect to “%s”.").format(connectionSetting.get_id());
break;
default: default:
log(`Invalid connection type: ${connectionType}`); log(`Invalid connection type: ${connectionType}`);
this._native.respond(requestId, Shell.NetworkAgentResponse.INTERNAL_ERROR); this._native.respond(requestId, Shell.NetworkAgentResponse.INTERNAL_ERROR);