From f4e8fcb6b53780bd2d126b22a89c379cd7c071d7 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 30 Jun 2021 14:58:14 +0200 Subject: [PATCH] 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 --- .../htdocs/luci-static/resources/view/system/acl.js | 3 +++ 1 file changed, 3 insertions(+) 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..8d1086f754 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); -- 2.30.2