luci-app-acl: ensure to set read/write ACL presets as uci lists

The rpcd daemon expects uci list notation for the login.read and login.write
options, so ensure to set them accordingly when chosing the `full access` or
`readonly` presets while configuring an account.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9922c838cd)
This commit is contained in:
Jo-Philipp Wich 2021-07-07 16:48:09 +02:00
parent 720a57647b
commit 2b87ea0fc2

View file

@ -319,12 +319,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;
}