From 4cf17c7d48b91ef90b3f369e9179199c1bd94d02 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 2 Oct 2013 17:11:17 +0000 Subject: [PATCH] luci2: add acl group definition and menu entry for backup / restore / flash view --- luci2/share/acl.d/luci2.json | 50 ++++++++++++++++++++++++++++++++++ luci2/share/menu.d/system.json | 12 ++++++-- 2 files changed, 59 insertions(+), 3 deletions(-) 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 } } -- 2.30.2