-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fleet Privileges Display #204402
Fleet Privileges Display #204402
Conversation
/ci |
1 similar comment
/ci |
@elasticmachine merge upstream |
/ci |
Pinging @elastic/kibana-security (Team:Security) |
ACK: will review today, sorry for the delay! |
@@ -218,7 +218,7 @@ export class SpaceAwarePrivilegeSection extends Component<Props, State> { | |||
const viewMatrixButton = ( | |||
<PrivilegeSummary | |||
role={this.props.role} | |||
spaces={this.getDisplaySpaces()} | |||
spaces={this.getSelectedSpaces()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
There is something definitely off here when I select different access variations. See the video. Do you see the same?
Screen.Recording.2024-12-24.at.14.16.13.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed, can reproduce, will take a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6c631b4 pushed fix, but please hold on review for now, need to check tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@azasypkin ready for review 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I'll review on Monday
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we have another issue now. If Read/All access to Fleet is granted through a Kibana privilege entry with “All Spaces”, the privilege summary for any space-specific privileges should reflect what is granted by the “All Spaces” privilege.
Screen.Recording.2024-12-30.at.16.01.07.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Screen.Recording.2024-12-31.at.11.34.58.mov
@azasypkin pushed a fix and checked it with multiple spaces, should work as expected 🙌
@elasticmachine merge upstream |
@@ -52,7 +52,7 @@ function showPrivilege(allSpacesSelected: boolean, primaryFeature?: PrimaryFeatu | |||
if ( | |||
primaryFeature?.name == null || | |||
primaryFeature?.disabled || | |||
(primaryFeature.requireAllSpaces && !allSpacesSelected) | |||
(primaryFeature?.requireAllSpaces && !allSpacesSelected) | |||
) { | |||
return 'None'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: I know it was here before your PR, but shouldn't None
be a localized string instead of hardcoded English one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, thanks for checking. I wonder if that was a deliberate decision. In any case, it’s outside the scope of this PR.
@@ -210,11 +212,20 @@ export const PrivilegeSummaryTable = (props: PrivilegeSummaryTableProps) => { | |||
</EuiFlexGroup> | |||
); | |||
|
|||
const categoryPrivileges = Object.keys(privileges).reduce((acc, key) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional nit: since you retrieve value using the key anyway, Object.values
might have been a slightly better choice. Or even something like this would be simpler:
const categoryPrivileges = Object.fromEntries(
Object.entries(privileges).map(([key, [, featurePrivileges]]) => [key, featurePrivileges])
);
@@ -218,7 +218,7 @@ export class SpaceAwarePrivilegeSection extends Component<Props, State> { | |||
const viewMatrixButton = ( | |||
<PrivilegeSummary | |||
role={this.props.role} | |||
spaces={this.getDisplaySpaces()} | |||
spaces={this.getSelectedSpaces()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we have another issue now. If Read/All access to Fleet is granted through a Kibana privilege entry with “All Spaces”, the privilege summary for any space-specific privileges should reflect what is granted by the “All Spaces” privilege.
Screen.Recording.2024-12-30.at.16.01.07.mov
64cb61d
to
017dad8
Compare
017dad8
to
ab901f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we have a new weird behavior 😬
There are so many edge cases, and it’s very tricky to handle them all. It would be even trickier to ensure they aren’t accidentally broken in the future. Thanks for updating the tests to include more cases. We might need to incorporate all these cases into our unit or functional tests, even if they are specifically around Fleet.
Screen.Recording.2025-01-06.at.15.41.15.mov
45cfb91
to
f0c1c9b
Compare
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks! Tested various scenarios and everything worked as expected.
@@ -48,14 +48,27 @@ function getColumnKey(entry: RoleKibanaPrivilege) { | |||
return `privilege_entry_${entry.spaces.join('|')}`; | |||
} | |||
|
|||
function showPrivilege(allSpacesSelected: boolean, primaryFeature?: PrimaryFeaturePrivilege) { | |||
function showPrivilege({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎖️ Thanks for switching to object/struct arguments! Using booleans directly in function arguments makes it really hard to follow the flow.
) { | ||
return 'None'; | ||
} | ||
|
||
if (primaryFeature?.requireAllSpaces && allSpacesSelected) { | ||
return globalPrimaryFeature?.name ?? 'None'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it'd be helpful if you can add a comment here with the example when the primary feature requires all spaces, all spaces are selected, but we cannot rely on then name of the primary feature and should use the name of the global primary feature instead
@@ -210,11 +235,20 @@ export const PrivilegeSummaryTable = (props: PrivilegeSummaryTableProps) => { | |||
</EuiFlexGroup> | |||
); | |||
|
|||
const categoryPrivileges = Object.keys(privileges).reduce((acc, key) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: any reason this suggestion didn't work? #204402 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it worked, I thought I actually committed the change, will push it
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
Starting backport for target branches: 8.x |
## Summary Fixed privileges display for features/subFeatures that require all spaces. ### Before Role privileges display for only `Default` space selected <img width="728" alt="Screenshot 2024-12-17 at 13 32 17" src="https://github.com/user-attachments/assets/151b7012-aa1a-430c-be22-cc91e64362e3" /> Privileges summary display for only `Default` space selected <img width="471" alt="Screenshot 2024-12-17 at 13 32 50" src="https://github.com/user-attachments/assets/964c2223-163d-4081-a37d-196f5df5df5c" /> ### After Role privileges display for only `Default` space selected <img width="739" alt="Screenshot 2024-12-17 at 13 30 00" src="https://github.com/user-attachments/assets/0f98a9d7-211d-46ec-82c6-25d29a44be6b" /> Privileges summary display for only `Default` space selected <img width="569" alt="Screenshot 2024-12-17 at 13 30 19" src="https://github.com/user-attachments/assets/932771fd-6486-4b7e-9de5-6cd34ab74dc9" /> ### How to test With `Default` space: 1. Navigate to Creating a new Role and assign Kibana privileges. 2. Set the Spaces to `Default` Space and the privilege level to All. 3. Navigate to Management category and verify that Fleet is set to `None`. 4. Click on "View privilege summary" and verify that Fleet is set to `None`. With `*All Spaces`: 1. Navigate to Creating a new Role and assign Kibana privileges. 2. Set the Spaces to `*All Spaces` and the privilege level to All. 3. Navigate to Management category and verify that Fleet is set to `All` 4. Click on "View privilege summary" and verify that Fleet is set to `All` ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) __Fixes: https://github.com/elastic/kibana/issues/194686__ ## Release Note Fixed privileges display for features/subFeatures that require all spaces. --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit d4196cd)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [Fleet Privileges Display (#204402)](#204402) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Elena Shostak","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-09T13:22:51Z","message":"Fleet Privileges Display (#204402)\n\n## Summary\r\n\r\nFixed privileges display for features/subFeatures that require all\r\nspaces.\r\n\r\n### Before\r\nRole privileges display for only `Default` space selected\r\n\r\n<img width=\"728\" alt=\"Screenshot 2024-12-17 at 13 32 17\"\r\nsrc=\"https://github.com/user-attachments/assets/151b7012-aa1a-430c-be22-cc91e64362e3\"\r\n/>\r\n\r\nPrivileges summary display for only `Default` space selected\r\n\r\n<img width=\"471\" alt=\"Screenshot 2024-12-17 at 13 32 50\"\r\nsrc=\"https://github.com/user-attachments/assets/964c2223-163d-4081-a37d-196f5df5df5c\"\r\n/>\r\n\r\n### After\r\nRole privileges display for only `Default` space selected\r\n\r\n<img width=\"739\" alt=\"Screenshot 2024-12-17 at 13 30 00\"\r\nsrc=\"https://github.com/user-attachments/assets/0f98a9d7-211d-46ec-82c6-25d29a44be6b\"\r\n/>\r\n\r\nPrivileges summary display for only `Default` space selected\r\n\r\n<img width=\"569\" alt=\"Screenshot 2024-12-17 at 13 30 19\"\r\nsrc=\"https://github.com/user-attachments/assets/932771fd-6486-4b7e-9de5-6cd34ab74dc9\"\r\n/>\r\n\r\n### How to test\r\nWith `Default` space:\r\n1. Navigate to Creating a new Role and assign Kibana privileges.\r\n2. Set the Spaces to `Default` Space and the privilege level to All.\r\n3. Navigate to Management category and verify that Fleet is set to\r\n`None`.\r\n4. Click on \"View privilege summary\" and verify that Fleet is set to\r\n`None`.\r\n\r\nWith `*All Spaces`:\r\n1. Navigate to Creating a new Role and assign Kibana privileges.\r\n2. Set the Spaces to `*All Spaces` and the privilege level to All.\r\n3. Navigate to Management category and verify that Fleet is set to `All`\r\n4. Click on \"View privilege summary\" and verify that Fleet is set to\r\n`All`\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n__Fixes: https://github.com/elastic/kibana/issues/194686__\r\n\r\n## Release Note\r\nFixed privileges display for features/subFeatures that require all\r\nspaces.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"d4196cd90280fbae4789504e784b1be6a50f34a9","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Security","Feature:Users/Roles/API Keys","v9.0.0","backport:prev-minor"],"title":"Fleet Privileges Display","number":204402,"url":"https://github.com/elastic/kibana/pull/204402","mergeCommit":{"message":"Fleet Privileges Display (#204402)\n\n## Summary\r\n\r\nFixed privileges display for features/subFeatures that require all\r\nspaces.\r\n\r\n### Before\r\nRole privileges display for only `Default` space selected\r\n\r\n<img width=\"728\" alt=\"Screenshot 2024-12-17 at 13 32 17\"\r\nsrc=\"https://github.com/user-attachments/assets/151b7012-aa1a-430c-be22-cc91e64362e3\"\r\n/>\r\n\r\nPrivileges summary display for only `Default` space selected\r\n\r\n<img width=\"471\" alt=\"Screenshot 2024-12-17 at 13 32 50\"\r\nsrc=\"https://github.com/user-attachments/assets/964c2223-163d-4081-a37d-196f5df5df5c\"\r\n/>\r\n\r\n### After\r\nRole privileges display for only `Default` space selected\r\n\r\n<img width=\"739\" alt=\"Screenshot 2024-12-17 at 13 30 00\"\r\nsrc=\"https://github.com/user-attachments/assets/0f98a9d7-211d-46ec-82c6-25d29a44be6b\"\r\n/>\r\n\r\nPrivileges summary display for only `Default` space selected\r\n\r\n<img width=\"569\" alt=\"Screenshot 2024-12-17 at 13 30 19\"\r\nsrc=\"https://github.com/user-attachments/assets/932771fd-6486-4b7e-9de5-6cd34ab74dc9\"\r\n/>\r\n\r\n### How to test\r\nWith `Default` space:\r\n1. Navigate to Creating a new Role and assign Kibana privileges.\r\n2. Set the Spaces to `Default` Space and the privilege level to All.\r\n3. Navigate to Management category and verify that Fleet is set to\r\n`None`.\r\n4. Click on \"View privilege summary\" and verify that Fleet is set to\r\n`None`.\r\n\r\nWith `*All Spaces`:\r\n1. Navigate to Creating a new Role and assign Kibana privileges.\r\n2. Set the Spaces to `*All Spaces` and the privilege level to All.\r\n3. Navigate to Management category and verify that Fleet is set to `All`\r\n4. Click on \"View privilege summary\" and verify that Fleet is set to\r\n`All`\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n__Fixes: https://github.com/elastic/kibana/issues/194686__\r\n\r\n## Release Note\r\nFixed privileges display for features/subFeatures that require all\r\nspaces.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"d4196cd90280fbae4789504e784b1be6a50f34a9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204402","number":204402,"mergeCommit":{"message":"Fleet Privileges Display (#204402)\n\n## Summary\r\n\r\nFixed privileges display for features/subFeatures that require all\r\nspaces.\r\n\r\n### Before\r\nRole privileges display for only `Default` space selected\r\n\r\n<img width=\"728\" alt=\"Screenshot 2024-12-17 at 13 32 17\"\r\nsrc=\"https://github.com/user-attachments/assets/151b7012-aa1a-430c-be22-cc91e64362e3\"\r\n/>\r\n\r\nPrivileges summary display for only `Default` space selected\r\n\r\n<img width=\"471\" alt=\"Screenshot 2024-12-17 at 13 32 50\"\r\nsrc=\"https://github.com/user-attachments/assets/964c2223-163d-4081-a37d-196f5df5df5c\"\r\n/>\r\n\r\n### After\r\nRole privileges display for only `Default` space selected\r\n\r\n<img width=\"739\" alt=\"Screenshot 2024-12-17 at 13 30 00\"\r\nsrc=\"https://github.com/user-attachments/assets/0f98a9d7-211d-46ec-82c6-25d29a44be6b\"\r\n/>\r\n\r\nPrivileges summary display for only `Default` space selected\r\n\r\n<img width=\"569\" alt=\"Screenshot 2024-12-17 at 13 30 19\"\r\nsrc=\"https://github.com/user-attachments/assets/932771fd-6486-4b7e-9de5-6cd34ab74dc9\"\r\n/>\r\n\r\n### How to test\r\nWith `Default` space:\r\n1. Navigate to Creating a new Role and assign Kibana privileges.\r\n2. Set the Spaces to `Default` Space and the privilege level to All.\r\n3. Navigate to Management category and verify that Fleet is set to\r\n`None`.\r\n4. Click on \"View privilege summary\" and verify that Fleet is set to\r\n`None`.\r\n\r\nWith `*All Spaces`:\r\n1. Navigate to Creating a new Role and assign Kibana privileges.\r\n2. Set the Spaces to `*All Spaces` and the privilege level to All.\r\n3. Navigate to Management category and verify that Fleet is set to `All`\r\n4. Click on \"View privilege summary\" and verify that Fleet is set to\r\n`All`\r\n\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n__Fixes: https://github.com/elastic/kibana/issues/194686__\r\n\r\n## Release Note\r\nFixed privileges display for features/subFeatures that require all\r\nspaces.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"d4196cd90280fbae4789504e784b1be6a50f34a9"}}]}] BACKPORT--> Co-authored-by: Elena Shostak <[email protected]>
## Summary Fixed privileges display for features/subFeatures that require all spaces. ### Before Role privileges display for only `Default` space selected <img width="728" alt="Screenshot 2024-12-17 at 13 32 17" src="https://github.com/user-attachments/assets/151b7012-aa1a-430c-be22-cc91e64362e3" /> Privileges summary display for only `Default` space selected <img width="471" alt="Screenshot 2024-12-17 at 13 32 50" src="https://github.com/user-attachments/assets/964c2223-163d-4081-a37d-196f5df5df5c" /> ### After Role privileges display for only `Default` space selected <img width="739" alt="Screenshot 2024-12-17 at 13 30 00" src="https://github.com/user-attachments/assets/0f98a9d7-211d-46ec-82c6-25d29a44be6b" /> Privileges summary display for only `Default` space selected <img width="569" alt="Screenshot 2024-12-17 at 13 30 19" src="https://github.com/user-attachments/assets/932771fd-6486-4b7e-9de5-6cd34ab74dc9" /> ### How to test With `Default` space: 1. Navigate to Creating a new Role and assign Kibana privileges. 2. Set the Spaces to `Default` Space and the privilege level to All. 3. Navigate to Management category and verify that Fleet is set to `None`. 4. Click on "View privilege summary" and verify that Fleet is set to `None`. With `*All Spaces`: 1. Navigate to Creating a new Role and assign Kibana privileges. 2. Set the Spaces to `*All Spaces` and the privilege level to All. 3. Navigate to Management category and verify that Fleet is set to `All` 4. Click on "View privilege summary" and verify that Fleet is set to `All` ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) __Fixes: https://github.com/elastic/kibana/issues/194686__ ## Release Note Fixed privileges display for features/subFeatures that require all spaces. --------- Co-authored-by: Elastic Machine <[email protected]>
## Summary Fixed privileges display for features/subFeatures that require all spaces. ### Before Role privileges display for only `Default` space selected <img width="728" alt="Screenshot 2024-12-17 at 13 32 17" src="https://github.com/user-attachments/assets/151b7012-aa1a-430c-be22-cc91e64362e3" /> Privileges summary display for only `Default` space selected <img width="471" alt="Screenshot 2024-12-17 at 13 32 50" src="https://github.com/user-attachments/assets/964c2223-163d-4081-a37d-196f5df5df5c" /> ### After Role privileges display for only `Default` space selected <img width="739" alt="Screenshot 2024-12-17 at 13 30 00" src="https://github.com/user-attachments/assets/0f98a9d7-211d-46ec-82c6-25d29a44be6b" /> Privileges summary display for only `Default` space selected <img width="569" alt="Screenshot 2024-12-17 at 13 30 19" src="https://github.com/user-attachments/assets/932771fd-6486-4b7e-9de5-6cd34ab74dc9" /> ### How to test With `Default` space: 1. Navigate to Creating a new Role and assign Kibana privileges. 2. Set the Spaces to `Default` Space and the privilege level to All. 3. Navigate to Management category and verify that Fleet is set to `None`. 4. Click on "View privilege summary" and verify that Fleet is set to `None`. With `*All Spaces`: 1. Navigate to Creating a new Role and assign Kibana privileges. 2. Set the Spaces to `*All Spaces` and the privilege level to All. 3. Navigate to Management category and verify that Fleet is set to `All` 4. Click on "View privilege summary" and verify that Fleet is set to `All` ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) __Fixes: https://github.com/elastic/kibana/issues/194686__ ## Release Note Fixed privileges display for features/subFeatures that require all spaces. --------- Co-authored-by: Elastic Machine <[email protected]>
## Summary Fixed privileges display for features/subFeatures that require all spaces. ### Before Role privileges display for only `Default` space selected <img width="728" alt="Screenshot 2024-12-17 at 13 32 17" src="https://github.com/user-attachments/assets/151b7012-aa1a-430c-be22-cc91e64362e3" /> Privileges summary display for only `Default` space selected <img width="471" alt="Screenshot 2024-12-17 at 13 32 50" src="https://github.com/user-attachments/assets/964c2223-163d-4081-a37d-196f5df5df5c" /> ### After Role privileges display for only `Default` space selected <img width="739" alt="Screenshot 2024-12-17 at 13 30 00" src="https://github.com/user-attachments/assets/0f98a9d7-211d-46ec-82c6-25d29a44be6b" /> Privileges summary display for only `Default` space selected <img width="569" alt="Screenshot 2024-12-17 at 13 30 19" src="https://github.com/user-attachments/assets/932771fd-6486-4b7e-9de5-6cd34ab74dc9" /> ### How to test With `Default` space: 1. Navigate to Creating a new Role and assign Kibana privileges. 2. Set the Spaces to `Default` Space and the privilege level to All. 3. Navigate to Management category and verify that Fleet is set to `None`. 4. Click on "View privilege summary" and verify that Fleet is set to `None`. With `*All Spaces`: 1. Navigate to Creating a new Role and assign Kibana privileges. 2. Set the Spaces to `*All Spaces` and the privilege level to All. 3. Navigate to Management category and verify that Fleet is set to `All` 4. Click on "View privilege summary" and verify that Fleet is set to `All` ### Checklist Check the PR satisfies following conditions. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) __Fixes: https://github.com/elastic/kibana/issues/194686__ ## Release Note Fixed privileges display for features/subFeatures that require all spaces. --------- Co-authored-by: Elastic Machine <[email protected]>
Summary
Fixed privileges display for features/subFeatures that require all spaces.
Before
Role privileges display for only
Default
space selectedPrivileges summary display for only
Default
space selectedAfter
Role privileges display for only
Default
space selectedPrivileges summary display for only
Default
space selectedHow to test
With
Default
space:Default
Space and the privilege level to All.None
.None
.With
*All Spaces
:*All Spaces
and the privilege level to All.All
All
Checklist
Check the PR satisfies following conditions.
release_note:*
label is applied per the guidelinesFixes: #194686
Release Note
Fixed privileges display for features/subFeatures that require all spaces.