luci-mod-status: move index acl into own file 5330/head
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 6 Aug 2021 08:03:58 +0000 (10:03 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Fri, 3 Sep 2021 11:25:21 +0000 (13:25 +0200)
The ACL file luci-mod-status.json is already quite long.
It is also a separate menu item in LuCI, so in my view it makes sense to
move it to a separate file. An additional positive effect is that the
file then becomes clearer.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status-index.json [new file with mode: 0644]
modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json

diff --git a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status-index.json b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status-index.json
new file mode 100644 (file)
index 0000000..a9ae0ce
--- /dev/null
@@ -0,0 +1,52 @@
+{
+       "luci-mod-status-index": {
+               "description": "Grant access to main status display",
+               "read": {
+                       "file": {
+                               "/proc/sys/net/netfilter/nf_conntrack_count": [ "read" ],
+                               "/proc/sys/net/netfilter/nf_conntrack_max": [ "read" ],
+                               "/usr/lib/lua/luci/version.lua": [ "read" ],
+                               "/www/luci-static/resources/view/status/include": [ "list" ]
+                       },
+                       "ubus": {
+                               "file": [ "list", "read" ],
+                               "system": [ "board", "info" ]
+                       }
+               },
+               "write": {
+                       "uci": [ "dhcp" ]
+               }
+       },
+
+       "luci-mod-status-index-dhcp": {
+               "description": "Grant access to DHCP status display",
+               "read": {
+                       "ubus": {
+                               "luci-rpc": [ "getDHCPLeases" ]
+                       }
+               }
+       },
+
+       "luci-mod-status-index-dsl": {
+               "description": "Grant access to DSL status display",
+               "read": {
+                       "ubus": {
+                               "dsl": [ "metrics" ]
+                       }
+               }
+       },
+
+       "luci-mod-status-index-wifi": {
+               "description": "Grant access to wireless status display",
+               "read": {
+                       "ubus": {
+                               "iwinfo": [ "assoclist" ]
+                       }
+               },
+               "write": {
+                       "ubus": {
+                               "hostapd.*": [ "del_client", "wps_start", "wps_cancel", "wps_status" ]
+                       }
+               }
+       }
+}
index 7199cb76f9b668f2b9296791b9c31d4a5f5463eb..32de24c06f34c343ac499df1937f064da657c8fb 100644 (file)
                                "file": [ "exec" ]
                        }
                }
-       },
-
-       "luci-mod-status-index": {
-               "description": "Grant access to main status display",
-               "read": {
-                       "file": {
-                               "/proc/sys/net/netfilter/nf_conntrack_count": [ "read" ],
-                               "/proc/sys/net/netfilter/nf_conntrack_max": [ "read" ],
-                               "/usr/lib/lua/luci/version.lua": [ "read" ],
-                               "/www/luci-static/resources/view/status/include": [ "list" ]
-                       },
-                       "ubus": {
-                               "file": [ "list", "read" ],
-                               "system": [ "board", "info" ]
-                       }
-               },
-               "write": {
-                       "uci": [ "dhcp" ]
-               }
-       },
-
-       "luci-mod-status-index-dhcp": {
-               "description": "Grant access to DHCP status display",
-               "read": {
-                       "ubus": {
-                               "luci-rpc": [ "getDHCPLeases" ]
-                       }
-               }
-       },
-
-       "luci-mod-status-index-dsl": {
-               "description": "Grant access to DSL status display",
-               "read": {
-                       "ubus": {
-                               "dsl": [ "metrics" ]
-                       }
-               }
-       },
-
-       "luci-mod-status-index-wifi": {
-               "description": "Grant access to wireless status display",
-               "read": {
-                       "ubus": {
-                               "iwinfo": [ "assoclist" ]
-                       }
-               },
-               "write": {
-                       "ubus": {
-                               "hostapd.*": [ "del_client", "wps_start", "wps_cancel", "wps_status" ]
-                       }
-               }
        }
 }