Reworked periodic activities

This commit is contained in:
Luca Deri 2024-02-17 13:23:20 +01:00
parent 64b603d855
commit ab4e49939e
15 changed files with 277 additions and 169 deletions

View file

@ -1,5 +1,5 @@
--
-- (C) 2017 - ntop.org
-- (C) 2017-24 - ntop.org
--
local ts_common = {}

View file

@ -189,7 +189,12 @@ end
local function isUserAccessAllowed(tags)
local user = _SESSION and _SESSION["user"] or ""
if tags.ifid and not ntop.isnEdge() and not ntop.isAllowedInterface(tonumber(tags.ifid)) then
if(user == "admin") then
return true
end
if tags.ifid and not ntop.isnEdge()
and not ntop.isAllowedInterface(tonumber(tags.ifid)) then
traceError(TRACE_ERROR, TRACE_CONSOLE, "User: " .. user .. " is not allowed to access interface " .. tags.ifid)
return false
end