mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Implements captive portal users
This commit is contained in:
parent
d9af0c8025
commit
4e2c7b8e8b
12 changed files with 138 additions and 30 deletions
|
|
@ -16,6 +16,7 @@ if(haveAdminPrivileges()) then
|
|||
host_role = _POST["host_role"]
|
||||
networks = _POST["allowed_networks"]
|
||||
allowed_interface = _POST["allowed_interface"]
|
||||
host_pool_id = _POST["host_pool_id"]
|
||||
|
||||
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\" }")
|
||||
|
|
@ -27,7 +28,7 @@ if(haveAdminPrivileges()) then
|
|||
return
|
||||
end
|
||||
|
||||
if(ntop.addUser(username, full_name, password, host_role, networks, getInterfaceName(allowed_interface))) then
|
||||
if(ntop.addUser(username, full_name, password, host_role, networks, getInterfaceName(allowed_interface), host_pool_id)) 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