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 64974e8..ca5dd3c 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 a7753c9..16e117b 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
     }
 }