Implements #6994 (Add support for Radius User Capabilities)

Removed /metrics URL leftover
This commit is contained in:
Luca Deri 2022-12-01 22:18:48 +01:00
parent 0becfa1e53
commit d8769f866b
10 changed files with 147 additions and 71 deletions

View file

@ -176,12 +176,14 @@ else
},
{
entry = page_utils.menu_entries.traffic_analysis,
hidden = not ntop.isEnterprise() or
not prefs.is_dump_flows_to_clickhouse_enabled or
ifs.isViewed or not
(auth.has_capability(auth.capabilities.historical_flows) and not
ntop.getPref("ntopng.user." .. session_user .. ".allow_historical_flow") == "1" and not
is_admin),
hidden = false,
hidden = (not ntop.isEnterprise())
or (not prefs.is_dump_flows_to_clickhouse_enabled)
or ifs.isViewed
or not (auth.has_capability(auth.capabilities.historical_flows)
and not ntop.getPref("ntopng.user." .. session_user .. ".allow_historical_flow") == "1"
and not is_admin)
,
url = "/lua/pro/db_search.lua?page=analysis",
},
{
@ -224,9 +226,11 @@ else
},
{
entry = page_utils.menu_entries.db_explorer,
hidden = not ntop.isEnterprise() or (not prefs.is_dump_flows_to_clickhouse_enabled) or ifs.isViewed or
not auth.has_capability(auth.capabilities.historical_flows) or
not (ntop.getPref("ntopng.user." .. session_user .. ".allow_historical_flow") == "1" or is_admin),
hidden = not ntop.isEnterprise() or (not prefs.is_dump_flows_to_clickhouse_enabled) or ifs.isViewed
or not auth.has_capability(auth.capabilities.historical_flows)
or not (ntop.getPref("ntopng.user." .. session_user .. ".allow_historical_flow") == "1" or is_admin)
,
url = "/lua/pro/db_search.lua",
},
}