mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[Fleet] Add missing privilege callout in Integrations Policies table (#195429)](https://github.com/elastic/kibana/pull/195429) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Cristina Amico","email":"criamico@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-09T07:06:56Z","message":"[Fleet] Add missing privilege callout in Integrations Policies table (#195429)\n\nFixes https://github.com/elastic/kibana/issues/191800\r\n\r\n## Summary\r\nAdd missing privilege callout in Integrations Policies table. \r\nCurrently the route\r\n`app/integrations/detail/{pkgName}-{version}/policies` is available even\r\nthough the policies tab is not visible with limited privileges.\r\n\r\n### Testing \r\n- Install `osquery_manager`\r\n- Enable rbac feature flag\r\n- Create role with privileges\r\n\r\n- Log in with user with the above role\r\n- Navigate to `app/integrations/detail/osquery_manager-1.14.0/policies`\r\n- Verify that a limited privileges callout is displayed\r\n","sha":"c3c587bc50816ce570d442b805fe63cb8faee8cc","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","v8.16.0","backport:version"],"title":"[Fleet] Add missing privilege callout in Integrations Policies table","number":195429,"url":"https://github.com/elastic/kibana/pull/195429","mergeCommit":{"message":"[Fleet] Add missing privilege callout in Integrations Policies table (#195429)\n\nFixes https://github.com/elastic/kibana/issues/191800\r\n\r\n## Summary\r\nAdd missing privilege callout in Integrations Policies table. \r\nCurrently the route\r\n`app/integrations/detail/{pkgName}-{version}/policies` is available even\r\nthough the policies tab is not visible with limited privileges.\r\n\r\n### Testing \r\n- Install `osquery_manager`\r\n- Enable rbac feature flag\r\n- Create role with privileges\r\n\r\n- Log in with user with the above role\r\n- Navigate to `app/integrations/detail/osquery_manager-1.14.0/policies`\r\n- Verify that a limited privileges callout is displayed\r\n","sha":"c3c587bc50816ce570d442b805fe63cb8faee8cc"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195429","number":195429,"mergeCommit":{"message":"[Fleet] Add missing privilege callout in Integrations Policies table (#195429)\n\nFixes https://github.com/elastic/kibana/issues/191800\r\n\r\n## Summary\r\nAdd missing privilege callout in Integrations Policies table. \r\nCurrently the route\r\n`app/integrations/detail/{pkgName}-{version}/policies` is available even\r\nthough the policies tab is not visible with limited privileges.\r\n\r\n### Testing \r\n- Install `osquery_manager`\r\n- Enable rbac feature flag\r\n- Create role with privileges\r\n\r\n- Log in with user with the above role\r\n- Navigate to `app/integrations/detail/osquery_manager-1.14.0/policies`\r\n- Verify that a limited privileges callout is displayed\r\n","sha":"c3c587bc50816ce570d442b805fe63cb8faee8cc"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Cristina Amico <criamico@users.noreply.github.com>
This commit is contained in:
parent
327ce6a521
commit
59c3b861a3
1 changed files with 10 additions and 1 deletions
|
@ -67,6 +67,8 @@ import {
|
|||
import type { WithHeaderLayoutProps } from '../../../../layouts';
|
||||
import { WithHeaderLayout } from '../../../../layouts';
|
||||
|
||||
import { PermissionsError } from '../../../../../fleet/layouts';
|
||||
|
||||
import { DeferredAssetsWarning } from './assets/deferred_assets_warning';
|
||||
import { useIsFirstTimeAgentUserQuery } from './hooks';
|
||||
import { getInstallPkgRouteOptions } from './utils';
|
||||
|
@ -826,7 +828,14 @@ export function Detail() {
|
|||
<Configs packageInfo={packageInfo} />
|
||||
</Route>
|
||||
<Route path={INTEGRATIONS_ROUTING_PATHS.integration_details_policies}>
|
||||
<PackagePoliciesPage name={packageInfo.name} version={packageInfo.version} />
|
||||
{canReadIntegrationPolicies ? (
|
||||
<PackagePoliciesPage name={packageInfo.name} version={packageInfo.version} />
|
||||
) : (
|
||||
<PermissionsError
|
||||
error="MISSING_PRIVILEGES"
|
||||
requiredFleetRole="Agent Policies Read and Integrations Read"
|
||||
/>
|
||||
)}
|
||||
</Route>
|
||||
<Route path={INTEGRATIONS_ROUTING_PATHS.integration_details_custom}>
|
||||
<CustomViewPage packageInfo={packageInfo} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue