mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Allows alert access to admins and non-admins w/o allowed networks
Implements #5324
This commit is contained in:
parent
4e5e72bc12
commit
8cfb7b608a
6 changed files with 14 additions and 8 deletions
|
|
@ -768,10 +768,17 @@ function hasAlertsDisabled()
|
|||
end
|
||||
|
||||
function hasNindexSupport()
|
||||
local auth = require "auth"
|
||||
|
||||
if not ntop.isPro() or ntop.isWindows() then
|
||||
return false
|
||||
end
|
||||
|
||||
-- Don't allow nIndex for unauthorized users
|
||||
if not auth.has_capability(auth.capabilities.historical_flows) then
|
||||
return false
|
||||
end
|
||||
|
||||
-- TODO optimize
|
||||
if prefs == nil then
|
||||
prefs = ntop.getPrefs()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue