mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Initial import from SVN
This commit is contained in:
parent
1601f6bbf2
commit
730d76b9f5
1612 changed files with 715104 additions and 0 deletions
26
scripts/lua/admin/get_user_info.lua
Normal file
26
scripts/lua/admin/get_user_info.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
--
|
||||
-- (C) 2013 - ntop.org
|
||||
--
|
||||
|
||||
dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
require "lua_utils"
|
||||
|
||||
sendHTTPHeader('application/json')
|
||||
|
||||
if(haveAdminPrivileges()) then
|
||||
print("{\n")
|
||||
|
||||
users_list = ntop.getUsers()
|
||||
for key, value in pairs(users_list) do
|
||||
if(key == _GET["user"]) then
|
||||
print(' "username": "'..key..'",\n')
|
||||
print(' "password": "'..value["password"]..'",\n')
|
||||
print(' "full_name": "'..value["full_name"]..'",\n')
|
||||
print(' "group": "'..value["group"]..'",\n')
|
||||
print(' "allowed_nets": "'..value["allowed_nets"]..'"\n')
|
||||
end
|
||||
end
|
||||
|
||||
print("}")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue