Skip to content

Commit

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

# Backport

This will backport the following commits from `main` to `8.x`:
- [[SecuritySolution] Add ml.canGetMlInfo capabilities
(#201652)](#201652)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Angela
Chuang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-26T19:43:08Z","message":"[SecuritySolution]
Add ml.canGetMlInfo capabilities (#201652)\n\n##
Summary\r\n\r\nFixes:\r\nhttps://github.com//issues/189893\r\nhttps://github.com//issues/189948\r\n\r\nSteps
to verify:\r\n\r\n1.
Open\r\n`packages/kbn-es/src/serverless_resources/project_roles/security/roles.yml`,\r\ncomment
feature_ml.read from t1_analyst\r\n2. Open kibana serverless locally as
t1_analyst, see links are not\r\ndisplayed\r\n3. Open kibana serverless
locally as t2_analyst, see the links
are\r\ndisplayed","sha":"eca69516374cf2927e958e6b70502b038284756a","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","backport","v9.0.0","v8.17.0"],"title":"[SecuritySolution]
Add ml.canGetMlInfo
capabilities","number":201652,"url":"https://github.com/elastic/kibana/pull/201652","mergeCommit":{"message":"[SecuritySolution]
Add ml.canGetMlInfo capabilities (#201652)\n\n##
Summary\r\n\r\nFixes:\r\nhttps://github.com//issues/189893\r\nhttps://github.com//issues/189948\r\n\r\nSteps
to verify:\r\n\r\n1.
Open\r\n`packages/kbn-es/src/serverless_resources/project_roles/security/roles.yml`,\r\ncomment
feature_ml.read from t1_analyst\r\n2. Open kibana serverless locally as
t1_analyst, see links are not\r\ndisplayed\r\n3. Open kibana serverless
locally as t2_analyst, see the links
are\r\ndisplayed","sha":"eca69516374cf2927e958e6b70502b038284756a"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201652","number":201652,"mergeCommit":{"message":"[SecuritySolution]
Add ml.canGetMlInfo capabilities (#201652)\n\n##
Summary\r\n\r\nFixes:\r\nhttps://github.com//issues/189893\r\nhttps://github.com//issues/189948\r\n\r\nSteps
to verify:\r\n\r\n1.
Open\r\n`packages/kbn-es/src/serverless_resources/project_roles/security/roles.yml`,\r\ncomment
feature_ml.read from t1_analyst\r\n2. Open kibana serverless locally as
t1_analyst, see links are not\r\ndisplayed\r\n3. Open kibana serverless
locally as t2_analyst, see the links
are\r\ndisplayed","sha":"eca69516374cf2927e958e6b70502b038284756a"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Angela Chuang <[email protected]>
  • Loading branch information
kibanamachine and angorayc authored Nov 26, 2024
1 parent bd32157 commit 7372276
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 7372276

Please sign in to comment.