mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +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
|
|
@ -11,6 +11,7 @@ sendHTTPHeader('application/json')
|
|||
username = _GET["username"]
|
||||
host_role = _GET["host_role"]
|
||||
networks = _GET["networks"]
|
||||
allowed_interface = _GET["allowed_interface"]
|
||||
|
||||
if(username == nil) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in username\" }")
|
||||
|
|
@ -31,4 +32,11 @@ if(networks ~= nil) then
|
|||
end
|
||||
end
|
||||
|
||||
if(allowed_interface ~= nil) then
|
||||
if(not ntop.changeAllowedIfname(username, allowed_interface)) then
|
||||
print ("{ \"result\" : -1, \"message\" : \"Error in changing the allowed interface\" }")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
print ("{ \"result\" : 0, \"message\" : \"Parameters Updated\" }")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue