Radius code cleanup

This commit is contained in:
Matteo Biscosi 2023-04-07 15:08:40 +00:00
parent 4ef63af2a3
commit 313cb4e8ca
7 changed files with 440 additions and 294 deletions

View file

@ -70,6 +70,15 @@ if auth.has_capability(auth.capabilities.preferences) then
end
end
if(_POST["toggle_radius_auth"] == "1")
and((_POST["radius_server_address"] ~= "ntopng.prefs.radius.radius_server_address")
or (_POST["radius_secret"] ~= "ntopng.prefs.radius.radius_secret")
or (_POST["radius_admin_group"] ~= "ntopng.prefs.radius.radius_admin_group")
or (_POST["radius_unpriv_capabilties_group"] ~= "ntopng.prefs.radius.radius_unpriv_capabilties_group")
or (_POST["toggle_radius_accounting"] ~= "ntopng.prefs.radius.accounting_enabled")) then
ntop.updateRadiusLoginInfo()
end
if(_POST["disable_alerts_generation"] == "1") then
local alert_utils = require "alert_utils"
alert_utils.disableAlertsGeneration()