Fixes menu entry not correctly hidden (#7057)

This commit is contained in:
MatteoBiscosi 2022-12-19 17:09:05 +01:00
parent fe6df37b70
commit 45e0acf8ef

View file

@ -174,18 +174,6 @@ else
entry = page_utils.menu_entries.traffic_dashboard,
url = ntop.isPro() and '/lua/pro/dashboard.lua' or '/lua/index.lua',
},
{
entry = page_utils.menu_entries.traffic_analysis,
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",
},
{
entry = page_utils.menu_entries.divider,
},
@ -226,11 +214,12 @@ 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 (ntop.getPref("ntopng.user." .. session_user .. ".allow_historical_flow") == "1")
or is_admin),
url = "/lua/pro/db_search.lua",
},
}