luci2: rename switch acl group to network as it is going to be shared with other...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 13 Oct 2013 22:36:23 +0000 (22:36 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 13 Oct 2013 22:36:23 +0000 (22:36 +0000)
luci2/htdocs/luci2/view/network.switch.js
luci2/share/acl.d/luci2.json
luci2/share/menu.d/network.json

index c1f04d7..fa43134 100644 (file)
@@ -60,7 +60,7 @@ L.ui.view.extend({
 
        execute: function() {
                var self = this;
-               L.network.listSwitchNames().then(function(switches) {
+               return L.network.listSwitchNames().then(function(switches) {
                        L.rpc.batch();
 
                        for (var i = 0; i < switches.length; i++)
@@ -69,7 +69,7 @@ L.ui.view.extend({
                        return L.rpc.flush();
                }).then(function(switches) {
                        var m = new L.cbi.Map('network', {
-                               readonly:    !self.options.acls['switch']
+                               readonly:    !self.options.acls.network
                        });
 
                        for (var i = 0; i < switches.length; i++)
index 91f3313..4d32466 100644 (file)
                }
        },
 
-       "switch": {
-               "description": "Ethernet switch configuration",
-               "read": {
-                       "ubus": {
-                               "luci2.network": [
-                                       "switch_list",
-                                       "switch_info",
-                                       "switch_status"
-                               ]
-                       },
-                       "uci": [
-                               "network"
-                       ]
-               },
-               "write": {
-                       "uci": [
-                               "network"
-                       ]
-               }
-       },
-
        "diagnostics": {
                "description": "Network diagnostic tools",
                "read": {
                                "dhcp"
                        ]
                }
+       },
+
+       "network": {
+               "description": "Network, switch and routing configuration",
+               "read": {
+                       "ubus": {
+                               "luci2.network": [
+                                       "switch_list",
+                                       "switch_info",
+                                       "switch_status"
+                               ]
+                       },
+                       "uci": [
+                               "network"
+                       ]
+               },
+               "write": {
+                       "uci": [
+                               "network"
+                       ]
+               }
        }
 }
index 64921b3..e88dff6 100644 (file)
@@ -5,7 +5,7 @@
     },
     "network/switch": {
         "title": "Switch",
-        "acls": [ "switch" ],
+        "acls": [ "network" ],
         "view": "network/switch",
         "index": 30
     },