mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Adds per-user allowed interfaces (WIP)
This commit is contained in:
parent
400ad58131
commit
4091c9c38d
11 changed files with 377 additions and 184 deletions
|
|
@ -15,8 +15,9 @@ if(haveAdminPrivileges()) then
|
|||
confirm_password = _GET["confirm_password"]
|
||||
host_role = _GET["host_role"]
|
||||
networks = _GET["allowed_networks"]
|
||||
allowed_interface = _GET["allowed_interface"]
|
||||
|
||||
if(username == nil or full_name == nil or password == nil or confirm_password == nil or host_role == nil or networks == nil) then
|
||||
if(username == nil or full_name == nil or password == nil or confirm_password == nil or host_role == nil or networks == nil or allowed_interface == nil) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Invalid parameters\" }")
|
||||
return
|
||||
end
|
||||
|
|
@ -26,7 +27,7 @@ if(haveAdminPrivileges()) then
|
|||
return
|
||||
end
|
||||
|
||||
if(ntop.addUser(username, full_name, password, host_role, networks)) then
|
||||
if(ntop.addUser(username, full_name, password, host_role, networks, allowed_interface)) then
|
||||
print ("{ \"result\" : 0, \"message\" : \"User added successfully\" }")
|
||||
else
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error while adding new user\" }")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue