applications: add ACL dependency annotations to legacy controllers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
760763a7b5
commit
74da73b012
30 changed files with 96 additions and 35 deletions
|
@ -3,7 +3,7 @@
|
|||
module("luci.controller.adblock", package.seeall)
|
||||
|
||||
function index()
|
||||
entry({"admin", "services", "adblock"}, firstchild(), _("Adblock"), 60)
|
||||
entry({"admin", "services", "adblock"}, firstchild(), _("Adblock"), 60).acl_depends = { "luci-app-adblock" }
|
||||
entry({"admin", "services", "adblock", "overview"}, view("adblock/overview"), _("Overview"), 10)
|
||||
entry({"admin", "services", "adblock", "dnsreport"}, view("adblock/dnsreport"), _("DNS Report"), 20)
|
||||
entry({"admin", "services", "adblock", "blacklist"}, view("adblock/blacklist"), _("Edit Blacklist"), 30)
|
||||
|
|
|
@ -8,7 +8,7 @@ function index()
|
|||
return
|
||||
end
|
||||
|
||||
entry({"admin", "network", "ahcpd"}, cbi("ahcp"), _("AHCP Server"), 90)
|
||||
entry({"admin", "network", "ahcpd"}, cbi("ahcp"), _("AHCP Server"), 90).acl_depends = { "luci-app-ahcp" }
|
||||
entry({"admin", "network", "ahcpd", "status"}, call("ahcp_status"))
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,9 @@ function index()
|
|||
return
|
||||
end
|
||||
|
||||
entry({"admin", "services", "aria2"},
|
||||
firstchild(), _("Aria2")).dependent = false
|
||||
local e = entry({"admin", "services", "aria2"}, firstchild(), _("Aria2"))
|
||||
e.dependent = false
|
||||
e.acl_depends = { "luci-app-aria2" }
|
||||
|
||||
entry({"admin", "services", "aria2", "config"},
|
||||
cbi("aria2/config"), _("Configuration"), 1)
|
||||
|
|
|
@ -13,7 +13,11 @@ function index()
|
|||
if not nixio.fs.access("/etc/config/banip") then
|
||||
return
|
||||
end
|
||||
entry({"admin", "services", "banip"}, firstchild(), _("banIP"), 40).dependent = false
|
||||
|
||||
local e = entry({"admin", "services", "banip"}, firstchild(), _("banIP"), 40)
|
||||
e.dependent = false
|
||||
e.acl_depends = { "luci-app-banip" }
|
||||
|
||||
entry({"admin", "services", "banip", "tab_from_cbi"}, cbi("banip/overview_tab", {hideresetbtn=true, hidesavebtn=true}), _("Overview"), 10).leaf = true
|
||||
entry({"admin", "services", "banip", "ipset"}, template("banip/ipsetview"), _("IPSet-Lookup"), 20).leaf = true
|
||||
entry({"admin", "services", "banip", "ripe"}, template("banip/ripeview"), _("RIPE-Lookup"), 30).leaf = true
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
module("luci.controller.commands", package.seeall)
|
||||
|
||||
function index()
|
||||
entry({"admin", "system", "commands"}, firstchild(), _("Custom Commands"), 80)
|
||||
entry({"admin", "system", "commands"}, firstchild(), _("Custom Commands"), 80).acl_depends = { "luci-app-commands" }
|
||||
entry({"admin", "system", "commands", "dashboard"}, template("commands"), _("Dashboard"), 1)
|
||||
entry({"admin", "system", "commands", "config"}, cbi("commands"), _("Configure"), 2)
|
||||
entry({"admin", "system", "commands", "run"}, call("action_run"), nil, 3).leaf = true
|
||||
|
|
|
@ -18,20 +18,26 @@ function index()
|
|||
page.target = cbi("admin_network/cshark")
|
||||
page.title = _("CloudShark")
|
||||
page.order = 70
|
||||
page.acl_depends = { "luci-app-cshark" }
|
||||
|
||||
page = entry({"admin", "network", "cshark_iface_dump_start"}, call("cshark_iface_dump_start"), nil)
|
||||
page.acl_depends = { "luci-app-cshark" }
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "cshark_iface_dump_stop"}, call("cshark_iface_dump_stop"), nil)
|
||||
page.acl_depends = { "luci-app-cshark" }
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "cshark_check_status"}, call("cshark_check_status"), nil)
|
||||
page.acl_depends = { "luci-app-cshark" }
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "cshark_link_list_get"}, call("cshark_link_list_get"), nil)
|
||||
page.acl_depends = { "luci-app-cshark" }
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "cshark_link_list_clear"}, call("cshark_link_list_clear"), nil)
|
||||
page.acl_depends = { "luci-app-cshark" }
|
||||
page.leaf = true
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
module("luci.controller.dawn", package.seeall)
|
||||
|
||||
function index()
|
||||
entry({ "admin", "dawn" }, firstchild(), "DAWN", 60).dependent = false
|
||||
local e = entry({ "admin", "dawn" }, firstchild(), "DAWN", 60)
|
||||
e.dependent = false
|
||||
e.acl_depends = { "luci-app-dawn" }
|
||||
|
||||
entry({ "admin", "dawn", "configure_daemon" }, cbi("dawn/dawn_config"), "Configure DAWN", 1)
|
||||
entry({ "admin", "dawn", "view_network" }, cbi("dawn/dawn_network"), "View Network Overview", 2)
|
||||
entry({ "admin", "dawn", "view_hearing_map" }, cbi("dawn/dawn_hearing_map"), "View Hearing Map", 3)
|
||||
|
|
|
@ -11,7 +11,11 @@ function index()
|
|||
if not nixio.fs.access("/etc/config/dnscrypt-proxy") then
|
||||
nixio.fs.writefile("/etc/config/dnscrypt-proxy", "")
|
||||
end
|
||||
entry({"admin", "services", "dnscrypt-proxy"}, firstchild(), _("DNSCrypt-Proxy"), 60).dependent = false
|
||||
|
||||
local e = entry({"admin", "services", "dnscrypt-proxy"}, firstchild(), _("DNSCrypt-Proxy"), 60)
|
||||
e.dependent = false
|
||||
e.acl_depends = { "luci-app-dnscrypt-proxy" }
|
||||
|
||||
entry({"admin", "services", "dnscrypt-proxy", "tab_from_cbi"}, cbi("dnscrypt-proxy/overview_tab", {hideresetbtn=true, hidesavebtn=true}), _("Overview"), 10).leaf = true
|
||||
entry({"admin", "services", "dnscrypt-proxy", "logfile"}, call("logread"), _("View Logfile"), 20).leaf = true
|
||||
entry({"admin", "services", "dnscrypt-proxy", "advanced"}, firstchild(), _("Advanced"), 100)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module("luci.controller.https-dns-proxy", package.seeall)
|
||||
function index()
|
||||
if nixio.fs.access("/etc/config/https-dns-proxy") then
|
||||
entry({"admin", "services", "https-dns-proxy"}, cbi("https-dns-proxy"), _("DNS Over HTTPS Proxy"))
|
||||
entry({"admin", "services", "https-dns-proxy"}, cbi("https-dns-proxy"), _("DNS Over HTTPS Proxy")).acl_depends = { "luci-app-https-dns-proxy" }
|
||||
entry({"admin", "services", "https-dns-proxy", "action"}, call("https_dns_proxy_action"), nil).leaf = true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,6 +12,7 @@ function index()
|
|||
page.target = firstchild()
|
||||
page.title = _("VoIP")
|
||||
page.order = 90
|
||||
page.acl_depends = { "luci-app-ltqtapi" }
|
||||
|
||||
entry({"admin", "telephony", "account"}, cbi("luci_ltqtapi/account") , _("Account"), 10)
|
||||
entry({"admin", "telephony", "contact"}, cbi("luci_ltqtapi/contact") , _("Contacts"), 20)
|
||||
|
|
|
@ -30,12 +30,27 @@ function index()
|
|||
page.target = cbi("lxc")
|
||||
page.title = _("LXC Containers")
|
||||
page.order = 70
|
||||
page.acl_depends = { "luci-app-lxc" }
|
||||
|
||||
entry({"admin", "services", "lxc_create"}, call("lxc_create"), nil).leaf = true
|
||||
entry({"admin", "services", "lxc_action"}, call("lxc_action"), nil).leaf = true
|
||||
entry({"admin", "services", "lxc_get_downloadable"}, call("lxc_get_downloadable"), nil).leaf = true
|
||||
entry({"admin", "services", "lxc_configuration_get"}, call("lxc_configuration_get"), nil).leaf = true
|
||||
entry({"admin", "services", "lxc_configuration_set"}, call("lxc_configuration_set"), nil).leaf = true
|
||||
page = entry({"admin", "services", "lxc_create"}, call("lxc_create"), nil)
|
||||
page.acl_depends = { "luci-app-lxc" }
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "services", "lxc_action"}, call("lxc_action"), nil)
|
||||
page.acl_depends = { "luci-app-lxc" }
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "services", "lxc_get_downloadable"}, call("lxc_get_downloadable"), nil)
|
||||
page.acl_depends = { "luci-app-lxc" }
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "services", "lxc_configuration_get"}, call("lxc_configuration_get"), nil)
|
||||
page.acl_depends = { "luci-app-lxc" }
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "services", "lxc_configuration_set"}, call("lxc_configuration_set"), nil)
|
||||
page.acl_depends = { "luci-app-lxc" }
|
||||
page.leaf = true
|
||||
end
|
||||
|
||||
function lxc_get_downloadable()
|
||||
|
|
|
@ -16,7 +16,7 @@ function index()
|
|||
|
||||
entry({"admin", "status", "mwan"},
|
||||
alias("admin", "status", "mwan", "overview"),
|
||||
_("Load Balancing"), 600)
|
||||
_("Load Balancing"), 600).acl_depends = { "luci-app-mwan3" }
|
||||
|
||||
entry({"admin", "status", "mwan", "overview"},
|
||||
template("mwan/status_interface"))
|
||||
|
@ -38,7 +38,7 @@ function index()
|
|||
|
||||
entry({"admin", "network", "mwan"},
|
||||
alias("admin", "network", "mwan", "interface"),
|
||||
_("Load Balancing"), 600)
|
||||
_("Load Balancing"), 600).acl_depends = { "luci-app-mwan3" }
|
||||
|
||||
entry({"admin", "network", "mwan", "globals"},
|
||||
cbi("mwan/globalsconfig"),
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
module("luci.controller.nlbw", package.seeall)
|
||||
|
||||
function index()
|
||||
entry({"admin", "nlbw"}, firstchild(), _("Bandwidth Monitor"), 80)
|
||||
entry({"admin", "nlbw"}, firstchild(), _("Bandwidth Monitor"), 80).acl_depends = { "luci-app-nlbwmon" }
|
||||
entry({"admin", "nlbw", "display"}, template("nlbw/display"), _("Display"), 1)
|
||||
entry({"admin", "nlbw", "config"}, cbi("nlbw/config"), _("Configuration"), 2)
|
||||
entry({"admin", "nlbw", "backup"}, template("nlbw/backup"), _("Backup"), 3)
|
||||
|
|
|
@ -13,6 +13,7 @@ function index()
|
|||
page = entry({"admin", "vpn", "ocserv"}, alias("admin", "vpn", "ocserv", "main"),
|
||||
_("OpenConnect VPN"))
|
||||
page.dependent = true
|
||||
page.acl_depends = { "luci-app-ocserv" }
|
||||
|
||||
page = entry({"admin", "vpn", "ocserv", "main"},
|
||||
cbi("ocserv/main"),
|
||||
|
|
|
@ -26,6 +26,7 @@ function index()
|
|||
page.target = template("status-olsr/overview")
|
||||
page.title = _("OLSR")
|
||||
page.subindex = true
|
||||
page.acl_depends = { "luci-app-olsr" }
|
||||
|
||||
local page = node("admin", "status", "olsr", "json")
|
||||
page.target = call("action_json")
|
||||
|
@ -74,7 +75,6 @@ function index()
|
|||
{"admin", "services", "olsrd", "display"},
|
||||
cbi("olsr/olsrddisplay"), _("Display")
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
function action_json()
|
||||
|
|
|
@ -13,6 +13,7 @@ function index()
|
|||
cbi("olsr/olsrd"), "OLSR IPv4"
|
||||
)
|
||||
ol.subindex = true
|
||||
ol.acl_depends = { "luci-app-olsr" }
|
||||
|
||||
entry(
|
||||
{"admin", "services", "olsrd", "iface"},
|
||||
|
|
|
@ -13,6 +13,7 @@ function index()
|
|||
cbi("olsr/olsrd6"), "OLSR IPv6"
|
||||
)
|
||||
ol.subindex = true
|
||||
ol.acl_depends = { "luci-app-olsr" }
|
||||
|
||||
entry(
|
||||
{"admin", "services", "olsrd6", "iface"},
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
module("luci.controller.openvpn", package.seeall)
|
||||
|
||||
function index()
|
||||
entry( {"admin", "vpn", "openvpn"}, cbi("openvpn"), _("OpenVPN") )
|
||||
entry( {"admin", "vpn", "openvpn"}, cbi("openvpn"), _("OpenVPN") ).acl_depends = { "luci-app-openvpn" }
|
||||
entry( {"admin", "vpn", "openvpn", "basic"}, cbi("openvpn-basic"), nil ).leaf = true
|
||||
entry( {"admin", "vpn", "openvpn", "advanced"}, cbi("openvpn-advanced"), nil ).leaf = true
|
||||
entry( {"admin", "vpn", "openvpn", "file"}, form("openvpn-file"), nil ).leaf = true
|
||||
|
|
|
@ -21,7 +21,7 @@ local app_title = "Privoxy WEB proxy"
|
|||
local app_version = "1.0.6-1"
|
||||
|
||||
function index()
|
||||
entry( {"admin", "services", "privoxy"}, cbi("privoxy"), _("Privoxy WEB proxy"), 59)
|
||||
entry( {"admin", "services", "privoxy"}, cbi("privoxy"), _("Privoxy WEB proxy"), 59).acl_depends = { "luci-app-privoxy" }
|
||||
entry( {"admin", "services", "privoxy", "logview"}, call("logread") ).leaf = true
|
||||
entry( {"admin", "services", "privoxy", "startstop"}, post("startstop") ).leaf = true
|
||||
entry( {"admin", "services", "privoxy", "status"}, call("get_pid") ).leaf = true
|
||||
|
|
|
@ -20,7 +20,7 @@ local app_title = I18N.translate("Radicale CalDAV/CardDAV Server")
|
|||
local app_version = "1.1.0-1"
|
||||
|
||||
function index()
|
||||
entry( {"admin", "services", "radicale"}, alias("admin", "services", "radicale", "edit"), _("CalDAV/CardDAV"), 58)
|
||||
entry( {"admin", "services", "radicale"}, alias("admin", "services", "radicale", "edit"), _("CalDAV/CardDAV"), 58).acl_depends = { "luci-app-radicale" }
|
||||
entry( {"admin", "services", "radicale", "edit"}, cbi("radicale") ).leaf = true
|
||||
entry( {"admin", "services", "radicale", "logview"}, call("_logread") ).leaf = true
|
||||
entry( {"admin", "services", "radicale", "startstop"}, post("_startstop") ).leaf = true
|
||||
|
|
|
@ -12,6 +12,7 @@ function index()
|
|||
|
||||
page = entry({"admin", "services", "radicale2"}, alias("admin", "services", "radicale2", "server"), _("Radicale 2.x"))
|
||||
page.leaf = false
|
||||
page.acl_depends = { "luci-app-radicale2" }
|
||||
|
||||
page = entry({"admin", "services", "radicale2", "server"}, cbi("radicale2/server"), _("Server Settings"))
|
||||
page.leaf = true
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module("luci.controller.simple-adblock", package.seeall)
|
||||
function index()
|
||||
if nixio.fs.access("/etc/config/simple-adblock") then
|
||||
entry({"admin", "services", "simple-adblock"}, cbi("simple-adblock"), _("Simple AdBlock"))
|
||||
entry({"admin", "services", "simple-adblock"}, cbi("simple-adblock"), _("Simple AdBlock")).acl_depends = { "luci-app-simple-adblock" }
|
||||
entry({"admin", "services", "simple-adblock", "action"}, call("simple_adblock_action"), nil).leaf = true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ local util = require "luci.util"
|
|||
local ipc = require "luci.ip"
|
||||
|
||||
function index()
|
||||
entry({"admin", "services", "splash"}, cbi("splash/splash"), _("Client-Splash"), 90)
|
||||
entry({"admin", "services", "splash"}, cbi("splash/splash"), _("Client-Splash"), 90).acl_depends = { "luci-app-splash" }
|
||||
entry({"admin", "services", "splash", "splashtext" }, form("splash/splashtext"), _("Splashtext"), 10)
|
||||
|
||||
local e
|
||||
|
|
|
@ -23,4 +23,5 @@ function index()
|
|||
|
||||
page = entry({"admin", "network", "sqm"}, cbi("sqm"), _("SQM QoS"))
|
||||
page.dependent = true
|
||||
page.acl_depends = { "luci-app-sqm" }
|
||||
end
|
||||
|
|
|
@ -14,7 +14,11 @@ function index()
|
|||
if not nixio.fs.access("/etc/config/travelmate") then
|
||||
return
|
||||
end
|
||||
entry({"admin", "services", "travelmate"}, firstchild(), _("Travelmate"), 40).dependent = false
|
||||
|
||||
local e = entry({"admin", "services", "travelmate"}, firstchild(), _("Travelmate"), 40)
|
||||
e.dependent = false
|
||||
e.acl_depends = { "luci-app-travelmate" }
|
||||
|
||||
entry({"admin", "services", "travelmate", "tab_from_cbi"}, cbi("travelmate/overview_tab", {hideresetbtn=true, hidesavebtn=true}), _("Overview"), 10).leaf = true
|
||||
entry({"admin", "services", "travelmate", "stations"}, template("travelmate/stations"), _("Wireless Stations"), 20).leaf = true
|
||||
entry({"admin", "services", "travelmate", "log"}, template("travelmate/logread"), _("View Logfile"), 30).leaf = true
|
||||
|
|
|
@ -18,8 +18,9 @@ function index()
|
|||
|
||||
|
||||
-- Expanded View
|
||||
entry({"admin", "services", "unbound"},
|
||||
firstchild(), _("Recursive DNS")).dependent = false
|
||||
local e = entry({"admin", "services", "unbound"}, firstchild(), _("Recursive DNS"))
|
||||
e.dependent = false
|
||||
e.acl_depends = { "luci-app-unbound" }
|
||||
|
||||
-- UCI Tab(s)
|
||||
entry({"admin", "services", "unbound", "configure"},
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
module("luci.controller.vpn-policy-routing", package.seeall)
|
||||
function index()
|
||||
if nixio.fs.access("/etc/config/vpn-policy-routing") then
|
||||
entry({"admin", "vpn"}, firstchild(), _("VPN"), 60).dependent=false
|
||||
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", "action"}, call("vpn_policy_routing_action"), nil).leaf = true
|
||||
end
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
module("luci.controller.vpnbypass", package.seeall)
|
||||
function index()
|
||||
if nixio.fs.access("/etc/config/vpnbypass") then
|
||||
entry({"admin", "vpn"}, firstchild(), _("VPN"), 60).dependent=false
|
||||
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", "action"}, call("vpnbypass_action"), nil).leaf = true
|
||||
end
|
||||
|
|
|
@ -23,7 +23,11 @@ function index()
|
|||
if not nixio.fs.access("/etc/config/wifi_schedule") then
|
||||
return
|
||||
end
|
||||
entry({"admin", "services", "wifi_schedule"}, firstchild(), _("Wifi Schedule"), 60).dependent=false
|
||||
|
||||
local e = entry({"admin", "services", "wifi_schedule"}, firstchild(), _("Wifi Schedule"), 60)
|
||||
e.acl_depends = { "luci-app-wifischedule" }
|
||||
e.dependent = false
|
||||
|
||||
entry({"admin", "services", "wifi_schedule", "tab_from_cbi"}, cbi("wifischedule/wifi_schedule"), _("Schedule"), 1)
|
||||
entry({"admin", "services", "wifi_schedule", "wifi_schedule"}, call("wifi_schedule_log"), _("View Logfile"), 2)
|
||||
entry({"admin", "services", "wifi_schedule", "cronjob"}, call("view_crontab"), _("View Cron Jobs"), 3)
|
||||
|
|
Loading…
Reference in a new issue