diff --git a/patches/luci/hack/0001-Disable-flash-tab-because-Turris-is-autoupdated-and-.patch b/patches/luci/hack/0001-Disable-flash-tab-because-Turris-is-autoupdated-and-.patch index ee8fa51856d20f532ea71f91a6a8415238d4321c..0266422443ab27bdd14df6c78f6749bd2bc97778 100644 --- a/patches/luci/hack/0001-Disable-flash-tab-because-Turris-is-autoupdated-and-.patch +++ b/patches/luci/hack/0001-Disable-flash-tab-because-Turris-is-autoupdated-and-.patch @@ -1,28 +1,41 @@ -From 050f0ebfb65921f5a6f1ae9607c08ef8a25261d5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= <karel.koci@nic.cz> -Date: Wed, 27 Nov 2019 13:53:07 +0100 -Subject: [PATCH] Disable flash tab because Turris is autoupdated and this is - not supported +From f131d2402e54ba090b37201e4674105b330d6375 Mon Sep 17 00:00:00 2001 +From: Josef Schlehofer <pepe.schlehofer@gmail.com> +Date: Mon, 2 Dec 2019 14:04:25 +0100 +Subject: [PATCH] Remove flash tab from LuCI -This only hides it just to make it less available. It still can be -accessed by URL. +This removes the link to Flash Operations from LuCI menu and users can not +access it directly as it can be dangerous as we don't support updates or +backups provided by LuCI. + +Rebased for OpenWrt 18.06. +Inspiration: https://gitlab.labs.nic.cz/turris/turris-build/merge_requests/65 +(Main difference: users can not access it even directly!) --- - modules/luci-mod-system/luasrc/controller/admin/system.lua | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .../luasrc/controller/admin/system.lua | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -diff --git a/modules/luci-mod-system/luasrc/controller/admin/system.lua b/modules/luci-mod-system/luasrc/controller/admin/system.lua -index 1e0bebb4f..9bebe7898 100644 ---- a/modules/luci-mod-system/luasrc/controller/admin/system.lua -+++ b/modules/luci-mod-system/luasrc/controller/admin/system.lua -@@ -25,7 +25,7 @@ function index() - entry({"admin", "system", "leds"}, view("system/leds"), _("<abbr title=\"Light Emitting Diode\">LED</abbr> Configuration"), 60) - .file_depends = { "/sys/class/leds" } +diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua +index 153615b58..657e1742e 100644 +--- a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua ++++ b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua +@@ -33,13 +33,13 @@ function index() + end + + entry({"admin", "system", "flashops"}, call("action_flashops"), _("Backup / Flash Firmware"), 70) +- entry({"admin", "system", "flashops", "reset"}, post("action_reset")) +- entry({"admin", "system", "flashops", "backup"}, post("action_backup")) +- entry({"admin", "system", "flashops", "backupfiles"}, form("admin_system/backupfiles")) ++ -- entry({"admin", "system", "flashops", "reset"}, post("action_reset")) ++ -- entry({"admin", "system", "flashops", "backup"}, post("action_backup")) ++ -- entry({"admin", "system", "flashops", "backupfiles"}, form("admin_system/backupfiles")) -- entry({"admin", "system", "flash"}, view("system/flash"), _("Backup / Flash Firmware"), 70) -+ -- entry({"admin", "system", "flash"}, view("system/flash"), _("Backup / Flash Firmware"), 70) + -- call() instead of post() due to upload handling! +- entry({"admin", "system", "flashops", "restore"}, call("action_restore")) +- entry({"admin", "system", "flashops", "sysupgrade"}, call("action_sysupgrade")) ++ -- entry({"admin", "system", "flashops", "restore"}, call("action_restore")) ++ -- entry({"admin", "system", "flashops", "sysupgrade"}, call("action_sysupgrade")) - entry({"admin", "system", "reboot"}, view("system/reboot"), _("Reboot"), 90) - end + entry({"admin", "system", "reboot"}, template("admin_system/reboot"), _("Reboot"), 90) + entry({"admin", "system", "reboot", "call"}, post("action_reboot")) -- 2.24.0 -