mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Added ability to set historical flow permission to users (#6330)
This commit is contained in:
parent
297b5d4edb
commit
61f74ce0a1
16 changed files with 454 additions and 290 deletions
|
|
@ -13,6 +13,7 @@ local host_role = _POST["user_role"]
|
|||
local networks = _POST["allowed_networks"]
|
||||
local allowed_interface = _POST["allowed_interface"]
|
||||
local allow_pcap_download = _POST["allow_pcap_download"]
|
||||
local allow_historical_flow = _POST["allow_historical_flow"]
|
||||
local language = _POST["user_language"]
|
||||
|
||||
-- for captive portal users
|
||||
|
|
@ -64,6 +65,15 @@ if(not ntop.changeUserPermission(username, allow_pcap_download_enabled)) then
|
|||
return
|
||||
end
|
||||
|
||||
local allow_historical_flow_enabled = false
|
||||
if allow_historical_flow and allow_historical_flow == "1" then
|
||||
allow_historical_flow_enabled = true;
|
||||
end
|
||||
if(not ntop.changeHistoricalFlowPermission(username, allow_historical_flow_enabled)) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in changing user historical flow permission\" }")
|
||||
return
|
||||
end
|
||||
|
||||
if(language ~= nil) then
|
||||
if(not ntop.changeUserLanguage(username, language)) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in changing the user language\" }")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue