Added fix for displaying symbolic interface maes (and aliases) in user preferences

This commit is contained in:
Luca Deri 2017-06-06 19:36:53 +02:00
parent 7980f76756
commit 2f6800b7aa
3 changed files with 18 additions and 8 deletions

View file

@ -1,5 +1,5 @@
--
-- (C) 2013 - ntop.org
-- (C) 2013-17 - ntop.org
--
local dirs = ntop.getDirs()
@ -8,9 +8,9 @@ require "lua_utils"
sendHTTPHeader('application/json')
local username = _POST["username"]
local username = _POST["username"]
local host_role = _POST["user_role"]
local networks = _POST["allowed_networks"]
local networks = _POST["allowed_networks"]
local allowed_interface = _POST["allowed_interface"]
-- for captive portal users
@ -20,6 +20,14 @@ local limited_lifetime = _POST["lifetime_limited"]
local unlimited_lifetime = _POST["lifetime_unlimited"]
local lifetime_secs = tonumber((_POST["lifetime_secs"] or -1))
if(false) then
io.write("\n")
for k,v in pairs(_POST) do
local s = k.."="..v.."\n"
io.write(s)
end
end
if(username == nil) then
print ("{ \"result\" : -1, \"message\" : \"Error in username\" }")
return