luci2: add acl group definition and menu entry for backup / restore / flash view
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 2 Oct 2013 17:11:17 +0000 (17:11 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 2 Oct 2013 17:11:17 +0000 (17:11 +0000)
luci2/share/acl.d/luci2.json
luci2/share/menu.d/system.json

index 64974e8077ed3e8028c024ec5bf2902b7d22daa9..ca5dd3c8ddaec7b453fb640d5c81a4c70d52a8f0 100644 (file)
                }
        },
 
+       "upgrade": {
+               "description": "Firmware upgrade",
+               "read": {
+                       "ubus": {
+                               "luci2.system": [
+                                       "upgrade_test",
+                                       "reset_test"
+                               ]
+                       }
+               },
+               "write": {
+                       "luci-io": [
+                               "upload"
+                       ],
+                       "ubus": {
+                               "luci2.system": [
+                                       "upgrade_start",
+                                       "upgrade_clean",
+                                       "reset_start",
+                                       "reboot"
+                               ]
+                       }
+               }
+       },
+
+       "backup": {
+               "description": "Backup and Restore",
+               "read": {
+                       "luci-io": [
+                               "backup"
+                       ],
+                       "ubus": {
+                               "luci2.system": [
+                                       "backup_config_get",
+                                       "backup_list"
+                               ]
+                       }
+               },
+               "write": {
+                       "ubus": {
+                               "luci2.system": [
+                                       "backup_clean",
+                                       "backup_config_set",
+                                       "backup_restore",
+                                       "reboot"
+                               ]
+                       }
+               }
+       },
+
        "startup": {
                "description": "System boot settings",
                "read": {
index a7753c9dee2af1321392e20b08a01b9cfcbf0e46..16e117b78bebef659c4454f289c21a9688e6bf91 100644 (file)
         "view": "system/software",
         "index": 40
     },
+    "system/upgrade": {
+        "title": "Backup / Upgrade",
+        "acls": [ "backup", "upgrade" ],
+        "view": "system/upgrade",
+        "index": 50
+    },
     "system/startup": {
         "title": "Startup",
         "acls": [ "startup" ],
         "view": "system/startup",
-        "index": 50
+        "index": 60
     },
     "system/cron": {
         "title": "Scheduled Tasks",
         "acls": [ "cron" ],
         "view": "system/cron",
-        "index": 60
+        "index": 70
     },
     "system/leds": {
         "title": "LED Configuration",
         "acls": [ "leds" ],
         "view": "system/leds",
-        "index": 70
+        "index": 80
     }
 }