mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Host Pools UI changes
- Do now show the "Not Assigned" group in user pool dropdown - Show an alert message when creating a Captive Portal user and no pools are defined - Improve unique member validator to account missing network prefixes - Prevent deleting an Host Group when a captive portal user is defined on it
This commit is contained in:
parent
1bd0d01658
commit
0db8abd83e
11 changed files with 120 additions and 39 deletions
|
|
@ -2702,3 +2702,15 @@ function paramsPairsDecode(params, strict_mode)
|
|||
|
||||
return res
|
||||
end
|
||||
|
||||
function isCaptivePortalActive(ifstats)
|
||||
if not ntop.isEnterprise() then
|
||||
return false
|
||||
end
|
||||
|
||||
local ifstats = ifstats or interface.getStats()
|
||||
local is_bridge_iface = (ifstats["bridge.device_a"] ~= nil) and (ifstats["bridge.device_b"] ~= nil)
|
||||
local is_captive_portal_enabled = ntop.getPrefs()["is_captive_portal_enabled"]
|
||||
|
||||
return is_bridge_iface and is_captive_portal_enabled
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue