luci-proto-modemmanger: fix auth handling 7205/head
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 3 May 2024 10:43:06 +0000 (12:43 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Mon, 22 Jul 2024 08:24:04 +0000 (10:24 +0200)
This has never worked because the option 'auth' is not known to the
modemmanger proto handler. The correct uci name is 'allowedauth' and is
also a uci list option, so that several options can be selected.

This commit fixes this bug.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
protocols/luci-proto-modemmanager/htdocs/luci-static/resources/protocol/modemmanager.js

index b13dd310c7c672bb56f6a8bfd728c38d85a0ef36..fa3c0010254b69ac329cefe9d15c87804f4ba4f1 100644 (file)
@@ -76,11 +76,13 @@ return network.registerProtocol('modemmanager', {
                o = s.taboption('general', form.Value, 'pincode', _('PIN'));
                o.datatype = 'and(uinteger,minlength(4),maxlength(8))';
 
-               o = s.taboption('general', form.ListValue, 'auth', _('Authentication Type'));
-               o.value('both', _('PAP/CHAP (both)'));
+               o = s.taboption('general', form.DynamicList, 'allowedauth', _('Authentication Type'));
                o.value('pap', 'PAP');
                o.value('chap', 'CHAP');
-               o.value('none', _('None'));
+               o.value('mschap', 'MSCHAP');
+               o.value('mschapv2', 'MSCHAPv2');
+               o.value('eap', 'EAP');
+               o.value('', _('None'));
                o.default = 'none';
 
                o = s.taboption('general', form.ListValue, 'allowedmode', _('Allowed network technology'),