mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fixs for manage users lifetime
This commit is contained in:
parent
62899d4385
commit
bd6106e19c
5 changed files with 47 additions and 3 deletions
|
|
@ -17,6 +17,7 @@ local allowed_interface = _POST["allowed_interface"]
|
|||
local old_host_pool_id = _POST["old_host_pool_id"]
|
||||
local new_host_pool_id = _POST["host_pool_id"]
|
||||
local limited_lifetime = _POST["lifetime_limited"]
|
||||
local unlimited_lifetime = _POST["lifetime_unlimited"]
|
||||
local lifetime_secs = tonumber((_POST["lifetime_secs"] or -1))
|
||||
|
||||
if(username == nil) then
|
||||
|
|
@ -50,6 +51,11 @@ if(limited_lifetime ~= nil) then
|
|||
print ("{ \"result\" : -1, \"message\" : \"Error in changing the host lifetime\" }")
|
||||
return
|
||||
end
|
||||
elseif(unlimited_lifetime ~= nil) then
|
||||
if not ntop.clearUserLifetime(username) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in clearing the host lifetime\" }")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if(new_host_pool_id ~= nil and old_host_pool_id ~= nil and new_host_pool_id ~= old_host_pool_id) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue