From: Jo-Philipp Wich Date: Wed, 2 Oct 2013 17:11:17 +0000 (+0000) Subject: luci2: add acl group definition and menu entry for backup / restore / flash view X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci2%2Fui.git;a=commitdiff_plain;h=4cf17c7d48b91ef90b3f369e9179199c1bd94d02;hp=e45ac0ac7ff66f6e832eaee2403760fa191898db luci2: add acl group definition and menu entry for backup / restore / flash view --- diff --git a/luci2/share/acl.d/luci2.json b/luci2/share/acl.d/luci2.json index 64974e8..ca5dd3c 100644 --- a/luci2/share/acl.d/luci2.json +++ b/luci2/share/acl.d/luci2.json @@ -164,6 +164,56 @@ } }, + "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": { diff --git a/luci2/share/menu.d/system.json b/luci2/share/menu.d/system.json index a7753c9..16e117b 100644 --- a/luci2/share/menu.d/system.json +++ b/luci2/share/menu.d/system.json @@ -27,22 +27,28 @@ "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 } }