luci-app-vpn-policy-routing: don't clobber permissions of VPN menu
authorJo-Philipp Wich <jo@mein.io>
Tue, 19 May 2020 10:27:44 +0000 (12:27 +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-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua

index d8393439c17c70a5de971cec83798622c0463b5e..2daac795dd69b3dcfbd7f92f1e27e49e00cf00a7 100644 (file)
@@ -3,9 +3,8 @@ function index()
        if nixio.fs.access("/etc/config/vpn-policy-routing") then
                local e = entry({"admin", "vpn"}, firstchild(), _("VPN"), 60)
                e.dependent = false
-               e.acl_depends = { "luci-app-vpn-policy-routing" }
 
-               entry({"admin", "vpn", "vpn-policy-routing"}, cbi("vpn-policy-routing"), _("VPN Policy Routing"))
+               entry({"admin", "vpn", "vpn-policy-routing"}, cbi("vpn-policy-routing"), _("VPN Policy Routing")).acl_depends = { "luci-app-vpn-policy-routing" }
                entry({"admin", "vpn", "vpn-policy-routing", "action"}, call("vpn_policy_routing_action"), nil).leaf = true
        end
 end