luci-app-vpnbypass: don't clobber permissions of VPN menu
authorJo-Philipp Wich <jo@mein.io>
Tue, 19 May 2020 10:28:19 +0000 (12:28 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 19 May 2020 10:43:40 +0000 (12:43 +0200)
Ref: https://github.com/openwrt/luci/issues/4066
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7f4de85b0b9c4f6bd9a19bf5a44af3825b31e8c1)

applications/luci-app-vpnbypass/luasrc/controller/vpnbypass.lua

index d5f4a8cafd7cefeedfcf5042ef74f0324bd37c8e..0de6ff64814feb8852e982674b331a56924a9973 100644 (file)
@@ -3,9 +3,8 @@ function index()
        if nixio.fs.access("/etc/config/vpnbypass") then
                local e = entry({"admin", "vpn"}, firstchild(), _("VPN"), 60)
                e.dependent = false
-               e.acl_depends = { "luci-app-vpnbypass" }
 
-               entry({"admin", "vpn", "vpnbypass"}, cbi("vpnbypass"), _("VPN Bypass"))
+               entry({"admin", "vpn", "vpnbypass"}, cbi("vpnbypass"), _("VPN Bypass")).acl_depends = { "luci-app-vpnbypass" }
                entry({"admin", "vpn", "vpnbypass", "action"}, call("vpnbypass_action"), nil).leaf = true
        end
 end