add per user token creation gui (#4735, #4721)

This commit is contained in:
gabryon99 2020-11-17 18:29:33 +01:00
parent 7c48b3388c
commit 48316d5067
5 changed files with 76 additions and 11 deletions

View file

@ -51,8 +51,11 @@ if(haveAdminPrivileges()) then
if value["allow_pcap_download"] then
print(' "allow_pcap_download": true,\n')
end
local api_token = ntop.getUserAPIToken(key) or ""
print(' "username": "'..key..'",\n')
print(' "api_token": "' ..api_token.. '",\n')
print(' "password": "'..value["password"]..'",\n')
print(' "full_name": "'..value["full_name"]..'",\n')
print(' "group": "'..value["group"]..'"\n')