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>
This commit is contained in:
parent
ddedcfd146
commit
9922c838cd
1 changed files with 3 additions and 3 deletions
|
@ -322,12 +322,12 @@ return view.extend({
|
||||||
o.write = function(section_id) {
|
o.write = function(section_id) {
|
||||||
switch (this.formvalue(section_id)) {
|
switch (this.formvalue(section_id)) {
|
||||||
case 'write':
|
case 'write':
|
||||||
uci.set('rpcd', section_id, 'read', '*');
|
uci.set('rpcd', section_id, 'read', ['*']);
|
||||||
uci.set('rpcd', section_id, 'write', '*');
|
uci.set('rpcd', section_id, 'write', ['*']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'read':
|
case 'read':
|
||||||
uci.set('rpcd', section_id, 'read', '*');
|
uci.set('rpcd', section_id, 'read', ['*']);
|
||||||
uci.unset('rpcd', section_id, 'write');
|
uci.unset('rpcd', section_id, 'write');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue