summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-04-17 12:14:50 +0200
committerJo-Philipp Wich <jo@mein.io>2020-04-17 12:40:31 +0200
commit8f34e105c059575a9c75e43468345e3651210b81 (patch)
tree1cfb6f0f5b0df7e34bc5942760e8dfb1e3d53196 /modules
parent01d8283ecea730191ce41302acb7ecd1aaf0631f (diff)
treewide: add ACL annotations to menu entries
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-mod-network/root/usr/share/luci/menu.d/luci-mod-network.json13
-rw-r--r--modules/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json21
-rw-r--r--modules/luci-mod-system/root/usr/share/luci/menu.d/luci-mod-system.json25
3 files changed, 59 insertions, 0 deletions
diff --git a/modules/luci-mod-network/root/usr/share/luci/menu.d/luci-mod-network.json b/modules/luci-mod-network/root/usr/share/luci/menu.d/luci-mod-network.json
index 670f2c1a49..188c695f3f 100644
--- a/modules/luci-mod-network/root/usr/share/luci/menu.d/luci-mod-network.json
+++ b/modules/luci-mod-network/root/usr/share/luci/menu.d/luci-mod-network.json
@@ -7,6 +7,7 @@
"path": "network/switch"
},
"depends": {
+ "acl": [ "luci-mod-network-config" ],
"fs": { "/sbin/swconfig": "executable" },
"uci": { "network": { "@switch": true } }
}
@@ -20,6 +21,7 @@
"path": "network/wireless"
},
"depends": {
+ "acl": [ "luci-mod-network-config" ],
"uci": { "wireless": { "@wifi-device": true } }
}
},
@@ -38,6 +40,9 @@
"action": {
"type": "view",
"path": "network/interfaces"
+ },
+ "depends": {
+ "acl": [ "luci-mod-network-config" ]
}
},
@@ -49,6 +54,7 @@
"path": "network/dhcp"
},
"depends": {
+ "acl": [ "luci-mod-network-dhcp" ],
"uci": { "dhcp": true }
}
},
@@ -61,6 +67,7 @@
"path": "network/hosts"
},
"depends": {
+ "acl": [ "luci-mod-network-dhcp" ],
"uci": { "dhcp": true }
}
},
@@ -71,6 +78,9 @@
"action": {
"type": "view",
"path": "network/routes"
+ },
+ "depends": {
+ "acl": [ "luci-mod-network-config" ]
}
},
@@ -80,6 +90,9 @@
"action": {
"type": "view",
"path": "network/diagnostics"
+ },
+ "depends": {
+ "acl": [ "luci-mod-network-diagnostics" ]
}
}
}
diff --git a/modules/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json b/modules/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json
index 0dcf6e8435..e8eee643d5 100644
--- a/modules/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json
+++ b/modules/luci-mod-status/root/usr/share/luci/menu.d/luci-mod-status.json
@@ -5,6 +5,9 @@
"action": {
"type": "template",
"path": "admin_status/index"
+ },
+ "depends": {
+ "acl": [ "luci-mod-status-index" ]
}
},
@@ -14,6 +17,9 @@
"action": {
"type": "view",
"path": "status/iptables"
+ },
+ "depends": {
+ "acl": [ "luci-mod-status-firewall" ]
}
},
@@ -23,6 +29,9 @@
"action": {
"type": "view",
"path": "status/routes"
+ },
+ "depends": {
+ "acl": [ "luci-mod-status-routes" ]
}
},
@@ -32,6 +41,9 @@
"action": {
"type": "view",
"path": "status/syslog"
+ },
+ "depends": {
+ "acl": [ "luci-mod-status-logs" ]
}
},
@@ -41,6 +53,9 @@
"action": {
"type": "view",
"path": "status/dmesg"
+ },
+ "depends": {
+ "acl": [ "luci-mod-status-logs" ]
}
},
@@ -50,6 +65,9 @@
"action": {
"type": "view",
"path": "status/processes"
+ },
+ "depends": {
+ "acl": [ "luci-mod-status-processes" ]
}
},
@@ -59,6 +77,9 @@
"action": {
"type": "alias",
"path": "admin/status/realtime/load"
+ },
+ "depends": {
+ "acl": [ "luci-mod-status-realtime" ]
}
},
diff --git a/modules/luci-mod-system/root/usr/share/luci/menu.d/luci-mod-system.json b/modules/luci-mod-system/root/usr/share/luci/menu.d/luci-mod-system.json
index 4a65dec17a..90a7001b78 100644
--- a/modules/luci-mod-system/root/usr/share/luci/menu.d/luci-mod-system.json
+++ b/modules/luci-mod-system/root/usr/share/luci/menu.d/luci-mod-system.json
@@ -5,6 +5,9 @@
"action": {
"type": "view",
"path": "system/system"
+ },
+ "depends": {
+ "acl": [ "luci-mod-system-config" ]
}
},
@@ -13,6 +16,9 @@
"order": 2,
"action": {
"type": "firstchild"
+ },
+ "depends": {
+ "acl": [ "luci-mod-system-config", "luci-mod-system-ssh" ]
}
},
@@ -22,6 +28,9 @@
"action": {
"type": "view",
"path": "system/password"
+ },
+ "depends": {
+ "acl": [ "luci-mod-system-config" ]
}
},
@@ -33,6 +42,7 @@
"path": "system/dropbear"
},
"depends": {
+ "acl": [ "luci-mod-system-ssh" ],
"uci": { "dropbear": true }
}
},
@@ -45,6 +55,7 @@
"path": "system/sshkeys"
},
"depends": {
+ "acl": [ "luci-mod-system-ssh" ],
"uci": { "dropbear": true }
}
},
@@ -55,6 +66,9 @@
"action": {
"type": "view",
"path": "system/startup"
+ },
+ "depends": {
+ "acl": [ "luci-mod-system-init" ]
}
},
@@ -64,6 +78,9 @@
"action": {
"type": "view",
"path": "system/crontab"
+ },
+ "depends": {
+ "acl": [ "luci-mod-system-cron" ]
}
},
@@ -75,6 +92,7 @@
"path": "system/mounts"
},
"depends": {
+ "acl": [ "luci-mod-system-mounts" ],
"fs": { "/sbin/block": "executable" }
}
},
@@ -87,6 +105,7 @@
"path": "system/leds"
},
"depends": {
+ "acl": [ "luci-mod-system-config" ],
"fs": { "/sys/class/leds": "directory" }
}
},
@@ -97,6 +116,9 @@
"action": {
"type": "view",
"path": "system/flash"
+ },
+ "depends": {
+ "acl": [ "luci-mod-system-flash" ]
}
},
@@ -106,6 +128,9 @@
"action": {
"type": "view",
"path": "system/reboot"
+ },
+ "depends": {
+ "acl": [ "luci-mod-system-reboot" ]
}
}
}