Explorar el Código

luci-app-ssr-plus: add ACL dependency annotations

Signed-off-by: CN_SZTL <[email protected]>
CN_SZTL hace 4 años
padre
commit
df93f10957
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua

+ 5 - 2
luci-app-ssr-plus/luasrc/controller/shadowsocksr.lua

@@ -6,7 +6,10 @@ function index()
 	if not nixio.fs.access("/etc/config/shadowsocksr") then
 		call("act_reset")
 	end
-	entry({"admin", "services", "shadowsocksr"}, alias("admin", "services", "shadowsocksr", "client"), _("ShadowSocksR Plus+"), 10).dependent = true
+	local page
+	page = entry({"admin", "services", "shadowsocksr"}, alias("admin", "services", "shadowsocksr", "client"), _("ShadowSocksR Plus+"), 10)
+	page.dependent = true
+	page.acl_depends = { "luci-app-ssr-plus" }
 	entry({"admin", "services", "shadowsocksr", "client"}, cbi("shadowsocksr/client"), _("SSR Client"), 10).leaf = true
 	entry({"admin", "services", "shadowsocksr", "servers"}, arcombine(cbi("shadowsocksr/servers", {autoapply = true}), cbi("shadowsocksr/client-config")), _("Severs Nodes"), 20).leaf = true
 	entry({"admin", "services", "shadowsocksr", "control"}, cbi("shadowsocksr/control"), _("Access Control"), 30).leaf = true
@@ -123,4 +126,4 @@ end
 function act_delete()
 	luci.sys.call("/etc/init.d/shadowsocksr restart &")
 	luci.http.redirect(luci.dispatcher.build_url("admin", "services", "shadowsocksr", "servers"))
-end
+end