diff options
author | Florian Eckert <fe@dev.tdt.de> | 2021-06-30 14:58:14 +0200 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2021-07-01 08:13:35 +0200 |
commit | f4e8fcb6b53780bd2d126b22a89c379cd7c071d7 (patch) | |
tree | d7d3b94a6b0ccc1c3c93cff7cbb732501026207e /applications/luci-app-acl/htdocs | |
parent | 81c26a8eb38a0a8f78d0d51e4b5705d0c65a0114 (diff) |
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>
Diffstat (limited to 'applications/luci-app-acl/htdocs')
-rw-r--r-- | applications/luci-app-acl/htdocs/luci-static/resources/view/system/acl.js | 3 |
1 files changed, 3 insertions, 0 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..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); |