gluon-luci-admin: disable when not in configmode

For security reasons we'd like to disable all HTTP config interfaces
when the node is operating normally. This patch disables gluon-luci-admin
when configmode is not enabled.
This commit is contained in:
Nils Schneider 2014-01-21 06:13:25 +01:00
parent 54fec96e7b
commit 37fc87539c
1 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,11 @@ function index()
local uci_state = luci.model.uci.cursor_state()
local configmode = uci_state:get_first("gluon-config-mode", "wizard", "running", "0") == "1"
-- Disable gluon-luci-admin when configmode is not enabled
if not configmode then
return
end
local root = node()
if not root.lock then
root.target = alias("admin")