mirror of
https://github.com/openwrt/luci.git
synced 2025-12-26 15:36:22 +04:00
luci-app-acl: unset read and write before acl set
If the setting in the view is set to `denied`, only the read list option is deleted. This is not correct. The write list option must also be deleted. To ensure that the correct configuration is saved, the write and read list options are always deleted beforehand and then rewritten. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user