diff options
Diffstat (limited to 'applications/luci-app-acl/htdocs/luci-static')
-rw-r--r-- | applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js b/applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js index 618facd6e6..50e6075fbb 100644 --- a/applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js +++ b/applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js @@ -146,6 +146,9 @@ var cbiACLSelect = form.Value.extend({ }, write: function(section_id, value) { + uci.unset('rpcd', section_id, 'read'); + uci.unset('rpcd', section_id, 'write'); + if (L.isObject(value) && Array.isArray(value.read)) uci.set('rpcd', section_id, 'read', value.read); @@ -216,16 +219,13 @@ return view.extend({ o.modalonly = true; o.value('shadow', _('Use UNIX password in /etc/shadow')); o.value('crypted', _('Use encrypted password hash')); - o.value('plain', _('Use plain password')); o.cfgvalue = function(section_id) { var value = uci.get('rpcd', section_id, 'password') || ''; if (value.substring(0, 3) == '$p$') return 'shadow'; - else if (value.substring(0, 3) == '$1$' || value == null) - return 'crypted'; else - return 'plain'; + return 'crypted'; }; o.write = function() {}; @@ -246,7 +246,6 @@ return view.extend({ o.password = true; o.rmempty = false; o.depends('_variant', 'crypted'); - o.depends('_variant', 'plain'); o.cfgvalue = function(section_id) { var value = uci.get('rpcd', section_id, 'password') || ''; return (value.substring(0, 3) == '$p$') ? '' : value; @@ -319,12 +318,12 @@ return view.extend({ o.write = function(section_id) { switch (this.formvalue(section_id)) { case 'write': - uci.set('rpcd', section_id, 'read', '*'); - uci.set('rpcd', section_id, 'write', '*'); + uci.set('rpcd', section_id, 'read', ['*']); + uci.set('rpcd', section_id, 'write', ['*']); break; case 'read': - uci.set('rpcd', section_id, 'read', '*'); + uci.set('rpcd', section_id, 'read', ['*']); uci.unset('rpcd', section_id, 'write'); break; } |