Skip to content

Commit

Permalink
[SecuritySolution] Add ml.canGetMlInfo capabilities (#201652)
Browse files Browse the repository at this point in the history
## Summary

Fixes:
#189893
#189948

Steps to verify:

1. Open
`packages/kbn-es/src/serverless_resources/project_roles/security/roles.yml`,
comment feature_ml.read from t1_analyst
2. Open kibana serverless locally as t1_analyst, see links are not
displayed
3. Open kibana serverless locally as t2_analyst, see the links are
displayed
  • Loading branch information
angorayc authored Nov 26, 2024
1 parent fa16ab3 commit eca6951
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const mlAppLink: LinkItem = {
id: SecurityPageName.mlLanding,
title: i18n.ML_TITLE,
path: MACHINE_LEARNING_PATH,
capabilities: [`${SERVER_APP_ID}.show`],
capabilities: [[`${SERVER_APP_ID}.show`, `ml.canGetJobs`]],
globalSearchKeywords: [i18n.ML_KEYWORD],
hideTimeline: true,
skipUrlState: true,
Expand Down
6 changes: 6 additions & 0 deletions x-pack/plugins/security_solution/public/explore/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const networkLinks: LinkItem = {
defaultMessage: 'Network',
}),
],
capabilities: [`${SERVER_APP_ID}.show`],
links: [
{
id: SecurityPageName.networkFlows,
Expand Down Expand Up @@ -68,6 +69,7 @@ const networkLinks: LinkItem = {
title: i18n.translate('xpack.securitySolution.appLinks.hosts.anomalies', {
defaultMessage: 'Anomalies',
}),
capabilities: ['ml.canGetJobs'],
path: `${NETWORK_PATH}/anomalies`,
licenseType: 'gold',
},
Expand Down Expand Up @@ -95,6 +97,7 @@ const usersLinks: LinkItem = {
defaultMessage: 'Users',
}),
],
capabilities: [`${SERVER_APP_ID}.show`],
links: [
{
id: SecurityPageName.usersAll,
Expand All @@ -115,6 +118,7 @@ const usersLinks: LinkItem = {
title: i18n.translate('xpack.securitySolution.appLinks.users.anomalies', {
defaultMessage: 'Anomalies',
}),
capabilities: ['ml.canGetJobs'],
path: `${USERS_PATH}/anomalies`,
licenseType: 'gold',
},
Expand Down Expand Up @@ -148,6 +152,7 @@ const hostsLinks: LinkItem = {
defaultMessage: 'Hosts',
}),
],
capabilities: [`${SERVER_APP_ID}.show`],
links: [
{
id: SecurityPageName.hostsAll,
Expand All @@ -169,6 +174,7 @@ const hostsLinks: LinkItem = {
title: i18n.translate('xpack.securitySolution.appLinks.hosts.anomalies', {
defaultMessage: 'Anomalies',
}),
capabilities: ['ml.canGetJobs'],
path: `${HOSTS_PATH}/anomalies`,
licenseType: 'gold',
},
Expand Down

0 comments on commit eca6951

Please sign in to comment.