mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Reworking capabilities support
This commit is contained in:
parent
8fd7420b69
commit
7da1395b87
16 changed files with 251 additions and 109 deletions
|
|
@ -45,18 +45,22 @@ if(isAdministratorOrPrintErr()) then
|
|||
value["language"] = locales_utils.default_locale
|
||||
end
|
||||
end
|
||||
print(' "language": "'..value["language"]..'",\n')
|
||||
if value["allow_pcap_download"] then
|
||||
print(' "allow_pcap_download": true,\n')
|
||||
end
|
||||
|
||||
|
||||
print(' "language": "'..value["language"]..'",\n')
|
||||
if value["allow_historical_flow"] then
|
||||
print(' "allow_historical_flow": true,\n')
|
||||
end
|
||||
print(' "language": "'..value["language"]..'",\n')
|
||||
|
||||
if value["allow_pcap_download"] then
|
||||
print(' "allow_pcap_download": true,\n')
|
||||
end
|
||||
|
||||
local api_token = ntop.getUserAPIToken(key) or ""
|
||||
if value["allow_historical_flows"] then
|
||||
print(' "allow_historical_flows": true,\n')
|
||||
end
|
||||
|
||||
if value["allow_alerts"] then
|
||||
print(' "allow_alerts": true,\n')
|
||||
end
|
||||
|
||||
local api_token = ntop.getUserAPIToken(key) or ""
|
||||
|
||||
print(' "username": "'..key..'",\n')
|
||||
print(' "api_token": "' ..api_token.. '",\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue