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>
Sun, 24 May 2020 15:28:37 +0000 (17:28 +0200)
Ref: https://github.com/openwrt/luci/issues/4066
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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