From 74da73b012a7ac271d683f11d98de170215ae661 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 19 Apr 2020 17:14:58 +0200 Subject: applications: add ACL dependency annotations to legacy controllers Signed-off-by: Jo-Philipp Wich --- .../luci-app-nft-qos/luasrc/controller/nft-qos.lua | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'applications/luci-app-nft-qos/luasrc') diff --git a/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua b/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua index 4d0527e33f..899e41a7ff 100644 --- a/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua +++ b/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua @@ -8,12 +8,19 @@ function index() return end - entry({"admin", "status", "realtime", "rate"}, - template("nft-qos/rate"), _("Rate"), 5).leaf = true - entry({"admin", "status", "realtime", "rate_status"}, - call("action_rate")).leaf = true - entry({"admin", "services", "nft-qos"}, cbi("nft-qos/nft-qos"), - _("QoS over Nftables"), 60) + local e + + e = entry({"admin", "status", "realtime", "rate"}, template("nft-qos/rate"), _("Rate"), 5) + e.leaf = true + e.acl_depends = { "luci-app-nft-qos" } + + e = entry({"admin", "status", "realtime", "rate_status"}, call("action_rate")) + e.leaf = true + e.acl_depends = { "luci-app-nft-qos" } + + e = entry({"admin", "services", "nft-qos"}, cbi("nft-qos/nft-qos"), _("QoS over Nftables"), 60) + e.leaf = true + e.acl_depends = { "luci-app-nft-qos" } end function _action_rate(rv, n) -- cgit v1.2.3