summaryrefslogtreecommitdiff
path: root/luci2
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-10-13 22:36:23 +0000
committerJo-Philipp Wich <jow@openwrt.org>2013-10-13 22:36:23 +0000
commitc59141ddc324d259467d08ec222b4041b24f68f5 (patch)
treecbbf6f7219103b7b26d775bc62a869c70ccd283f /luci2
parent161827ba6ddf1621eefa8a1c87e763f4c643ca8b (diff)
downloadluci2-ui-c59141ddc324d259467d08ec222b4041b24f68f5.tar.gz
luci2: rename switch acl group to network as it is going to be shared with other views
Diffstat (limited to 'luci2')
-rw-r--r--luci2/htdocs/luci2/view/network.switch.js4
-rw-r--r--luci2/share/acl.d/luci2.json42
-rw-r--r--luci2/share/menu.d/network.json2
3 files changed, 24 insertions, 24 deletions
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
},