We need to hide the Anomaly tab or show a message to the user when they don't have permission to view ml jobs
Steps to reproduce
Create a user with elasticsearch index privileges:
indices: metrics-, metricbeat-
privileges: 'read', 'view_index_metadata'
and kibana privileges: Infrastructure
Navigate to Hosts View, click on a host to navigate to the Asset Details page
Click on Anomaly tab
Possible solution
We should hide the Anomaly tabs in case users don't have permission to view it or display a message saying that the user doesn't have permission if the same condition is not met, eg:
Check application.uiCapabilities.ml object.
Osquery displays a message, so If we decide to hide the Anomaly tab, we might want to hide Osquery tab to in case users don't have permission to view it for consistency.
Summary
We need to hide the Anomaly tab or show a message to the user when they don't have permission to view
ml
jobsSteps to reproduce
Possible solution
We should hide the Anomaly tabs in case users don't have permission to view it or display a message saying that the user doesn't have permission if the same condition is not met, eg:
Check
application.uiCapabilities.ml
object.Osquery displays a message, so If we decide to hide the Anomaly tab, we might want to hide Osquery tab to in case users don't have permission to view it for consistency.