[Dataset Quality] Failure store privilege fixes#232003
Conversation
|
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) |
| </EuiFlexItem> | ||
| <EuiFlexItem grow={true}> | ||
| {!dataStreamSettingsLoading && !hasFailureStore && canUserReadFailureStore ? ( | ||
| {!dataStreamSettingsLoading && !(hasFailureStore && canUserReadFailureStore) ? ( |
| sortable: true, | ||
| render: (_: any, dataStreamStat: DataStreamStat) => { | ||
| if (!dataStreamStat.hasFailureStore) { | ||
| if ( |
|
|
||
| const canUserReadFailureStore = Boolean( | ||
| dataStreamStats?.some((ds) => ds.userPrivileges.canReadFailureStore) | ||
| Object.values(datasetUserPrivileges?.datasetsPrivilages ?? {})?.some( |
| canUserReadFailureStore && ( | ||
| <EuiLink | ||
| href={locator?.getRedirectUrl(locatorParams)} | ||
| target="_blank" | ||
| external={false} | ||
| > | ||
| {i18n.translate('xpack.datasetQuality.enableFailureStore', { | ||
| defaultMessage: 'Enable failure store', | ||
| })} | ||
| </EuiLink> | ||
| ) |
There was a problem hiding this comment.
This code executes only when !(hasFailureStore && canUserReadFailureStore) is true, but then inside that statement, you're checking if canUserReadFailureStore is true. I think it that part might never execute.
There was a problem hiding this comment.
so the logic is if one of them or both are false we display the card.
then the link is only displayed if the user really has access to failure store and can enable it.
There was a problem hiding this comment.
You are right, I got confused a bit
|
Starting backport for target branches: 8.19, 9.1 https://github.com/elastic/kibana/actions/runs/17047140615 |
💚 Build Succeeded
Metrics [docs]Async chunks
|
closes elastic#231836 closes elastic#231576 closes elastic#231564 (cherry picked from commit 371b1ff) # Conflicts: # x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality_details/overview/quality_summary_cards/index.tsx
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
closes elastic#231836 closes elastic#231576 closes elastic#231564 (cherry picked from commit 371b1ff) # Conflicts: # x-pack/platform/plugins/shared/dataset_quality/public/components/dataset_quality_details/overview/quality_summary_cards/index.tsx
…2142) # Backport This will backport the following commits from `main` to `8.19`: - [[Dataset Quality] Failure store privilege fixes (#232003)](#232003) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"mohamedhamed-ahmed","email":"mohamed.ahmed@elastic.co"},"sourceCommit":{"committedDate":"2025-08-18T16:59:23Z","message":"[Dataset Quality] Failure store privilege fixes (#232003)\n\ncloses https://github.com/elastic/kibana/issues/231836\ncloses https://github.com/elastic/kibana/issues/231576\ncloses https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-logs","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Dataset Quality] Failure store privilege fixes","number":232003,"url":"https://github.com/elastic/kibana/pull/232003","mergeCommit":{"message":"[Dataset Quality] Failure store privilege fixes (#232003)\n\ncloses https://github.com/elastic/kibana/issues/231836\ncloses https://github.com/elastic/kibana/issues/231576\ncloses https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/232003","number":232003,"mergeCommit":{"message":"[Dataset Quality] Failure store privilege fixes (#232003)\n\ncloses https://github.com/elastic/kibana/issues/231836\ncloses https://github.com/elastic/kibana/issues/231576\ncloses https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250"}}]}] BACKPORT-->
) # Backport This will backport the following commits from `main` to `9.1`: - [[Dataset Quality] Failure store privilege fixes (#232003)](#232003) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"mohamedhamed-ahmed","email":"mohamed.ahmed@elastic.co"},"sourceCommit":{"committedDate":"2025-08-18T16:59:23Z","message":"[Dataset Quality] Failure store privilege fixes (#232003)\n\ncloses https://github.com/elastic/kibana/issues/231836\ncloses https://github.com/elastic/kibana/issues/231576\ncloses https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-logs","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Dataset Quality] Failure store privilege fixes","number":232003,"url":"https://github.com/elastic/kibana/pull/232003","mergeCommit":{"message":"[Dataset Quality] Failure store privilege fixes (#232003)\n\ncloses https://github.com/elastic/kibana/issues/231836\ncloses https://github.com/elastic/kibana/issues/231576\ncloses https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/232003","number":232003,"mergeCommit":{"message":"[Dataset Quality] Failure store privilege fixes (#232003)\n\ncloses https://github.com/elastic/kibana/issues/231836\ncloses https://github.com/elastic/kibana/issues/231576\ncloses https://github.com/elastic/kibana/issues/231564","sha":"371b1ff1b95a9747b01b27e110dd72f0794b6250"}}]}] BACKPORT-->
closes #231836
closes #231576
closes #231564