From: Jo-Philipp Wich Date: Sun, 13 Oct 2013 22:36:23 +0000 (+0000) Subject: luci2: rename switch acl group to network as it is going to be shared with other... X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=c59141ddc324d259467d08ec222b4041b24f68f5;p=project%2Fluci2%2Fui.git luci2: rename switch acl group to network as it is going to be shared with other views --- diff --git a/luci2/htdocs/luci2/view/network.switch.js b/luci2/htdocs/luci2/view/network.switch.js index c1f04d7..fa43134 100644 --- a/luci2/htdocs/luci2/view/network.switch.js +++ b/luci2/htdocs/luci2/view/network.switch.js @@ -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++) diff --git a/luci2/share/acl.d/luci2.json b/luci2/share/acl.d/luci2.json index 91f3313..4d32466 100644 --- a/luci2/share/acl.d/luci2.json +++ b/luci2/share/acl.d/luci2.json @@ -275,27 +275,6 @@ } }, - "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": { @@ -323,5 +302,26 @@ "dhcp" ] } + }, + + "network": { + "description": "Network, switch and routing configuration", + "read": { + "ubus": { + "luci2.network": [ + "switch_list", + "switch_info", + "switch_status" + ] + }, + "uci": [ + "network" + ] + }, + "write": { + "uci": [ + "network" + ] + } } } diff --git a/luci2/share/menu.d/network.json b/luci2/share/menu.d/network.json index 64921b3..e88dff6 100644 --- a/luci2/share/menu.d/network.json +++ b/luci2/share/menu.d/network.json @@ -5,7 +5,7 @@ }, "network/switch": { "title": "Switch", - "acls": [ "switch" ], + "acls": [ "network" ], "view": "network/switch", "index": 30 },