-
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
[Synthetic] Show monitors from all permitted spaces !! #196109
Conversation
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
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.
I created two new spaces: David's Space and Jennifer's Space. I created corresponding roles and assigned those roles to their respective spaces.
I then created two users, David and Jennifer, and granted them their corresponding roles.
As an admin, I went to the create monitor page in the default space. I likewise did this in the other two spaces.
I navigated to the default space, and the other two spaces as the admin and was able to see the monitors scoped to the current space, as well as all monitors from other spaces.
In another browser, I logged in as David and Jennifer users. As these lower-priv users I was only able to see the monitors created with the scope they have permission to view, even when choosing the "all permitted spaces" option.
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.
internal: true, | ||
version: INITIAL_REST_VERSION, | ||
}); | ||
if (spaceId) { |
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 would be nice to reduce nesting here by simply handling if (!spaceId) return {...}
and doing the additional computation in the root of the function, but not worth blocking the PR.
...lution/synthetics/public/apps/synthetics/components/monitors_page/common/show_all_spaces.tsx
Outdated
Show resolved
Hide resolved
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11372241546 |
## Summary Fixes elastic#194760 !! Fixes elastic#169753 !! Added an options to list monitors from all spaces which user has permission for , user can either select default option which is to get monitors from current space or all permitted spaces !! ### Testing Create monitors in 3 spaces, assign 2 spaces to a role, and create a user. Make sure monitors only appears to which user have space permission. <img width="1727" alt="image" src="https://github.com/user-attachments/assets/972d213a-ee00-4950-be9f-a209393cb69a"> --------- Co-authored-by: Justin Kambic <[email protected]> (cherry picked from commit 2f67874)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
#196596) # Backport This will backport the following commits from `main` to `8.x`: - [[Synthetic] Show monitors from all permitted spaces !! (#196109)](#196109) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-16T19:08:34Z","message":"[Synthetic] Show monitors from all permitted spaces !! (#196109)\n\n## Summary\n\nFixes #194760 !!\nFixes #169753 !!\n\nAdded an options to list monitors from all spaces which user has\npermission for , user can either select default option which is to get\nmonitors from current space or all permitted spaces !!\n\n### Testing\n\nCreate monitors in 3 spaces, assign 2 spaces to a role, and create a\nuser. Make sure monitors only appears to which user have space\npermission.\n\n<img width=\"1727\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/972d213a-ee00-4950-be9f-a209393cb69a\">\n\n---------\n\nCo-authored-by: Justin Kambic <[email protected]>","sha":"2f678744ab3b512cf5e212671a35b81edd1aeec9","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["v9.0.0","release_note:feature","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management","v8.16.0"],"title":"[Synthetic] Show monitors from all permitted spaces !!","number":196109,"url":"https://github.com/elastic/kibana/pull/196109","mergeCommit":{"message":"[Synthetic] Show monitors from all permitted spaces !! (#196109)\n\n## Summary\n\nFixes #194760 !!\nFixes #169753 !!\n\nAdded an options to list monitors from all spaces which user has\npermission for , user can either select default option which is to get\nmonitors from current space or all permitted spaces !!\n\n### Testing\n\nCreate monitors in 3 spaces, assign 2 spaces to a role, and create a\nuser. Make sure monitors only appears to which user have space\npermission.\n\n<img width=\"1727\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/972d213a-ee00-4950-be9f-a209393cb69a\">\n\n---------\n\nCo-authored-by: Justin Kambic <[email protected]>","sha":"2f678744ab3b512cf5e212671a35b81edd1aeec9"}},"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/196109","number":196109,"mergeCommit":{"message":"[Synthetic] Show monitors from all permitted spaces !! (#196109)\n\n## Summary\n\nFixes #194760 !!\nFixes #169753 !!\n\nAdded an options to list monitors from all spaces which user has\npermission for , user can either select default option which is to get\nmonitors from current space or all permitted spaces !!\n\n### Testing\n\nCreate monitors in 3 spaces, assign 2 spaces to a role, and create a\nuser. Make sure monitors only appears to which user have space\npermission.\n\n<img width=\"1727\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/972d213a-ee00-4950-be9f-a209393cb69a\">\n\n---------\n\nCo-authored-by: Justin Kambic <[email protected]>","sha":"2f678744ab3b512cf5e212671a35b81edd1aeec9"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Shahzad <[email protected]>
## Summary Fixes elastic#194760 !! Fixes elastic#169753 !! Added an options to list monitors from all spaces which user has permission for , user can either select default option which is to get monitors from current space or all permitted spaces !! ### Testing Create monitors in 3 spaces, assign 2 spaces to a role, and create a user. Make sure monitors only appears to which user have space permission. <img width="1727" alt="image" src="https://github.com/user-attachments/assets/972d213a-ee00-4950-be9f-a209393cb69a"> --------- Co-authored-by: Justin Kambic <[email protected]>
## Summary This PR #196109 was never back-ported to 8.16.0 !!
## Summary This PR elastic#196109 was never back-ported to 8.16.0 !! (cherry picked from commit 90b14e2)
## Summary This PR elastic#196109 was never back-ported to 8.16.0 !! (cherry picked from commit 90b14e2)
## Summary This PR elastic#196109 was never back-ported to 8.16.0 !! (cherry picked from commit 90b14e2)
## Summary This PR elastic#196109 was never back-ported to 8.16.0 !! (cherry picked from commit 90b14e2)
# Backport This will backport the following commits from `main` to `8.16`: - [Remove release notes for missing PR !! (#199878)](#199878) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T09:49:56Z","message":"Remove release notes for missing PR !! (#199878)\n\n## Summary\r\n\r\nThis PR #196109 was never\r\nback-ported to 8.16.0 !!","sha":"90b14e2ba9449e1550a60c47ccd80e55c4e189fa","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v8.17.0","v8.16.1"],"title":"Remove release notes for missing PR !!","number":199878,"url":"https://github.com/elastic/kibana/pull/199878","mergeCommit":{"message":"Remove release notes for missing PR !! (#199878)\n\n## Summary\r\n\r\nThis PR #196109 was never\r\nback-ported to 8.16.0 !!","sha":"90b14e2ba9449e1550a60c47ccd80e55c4e189fa"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199878","number":199878,"mergeCommit":{"message":"Remove release notes for missing PR !! (#199878)\n\n## Summary\r\n\r\nThis PR #196109 was never\r\nback-ported to 8.16.0 !!","sha":"90b14e2ba9449e1550a60c47ccd80e55c4e189fa"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Shahzad <[email protected]>
# Backport This will backport the following commits from `main` to `8.x`: - [Remove release notes for missing PR !! (#199878)](#199878) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T09:49:56Z","message":"Remove release notes for missing PR !! (#199878)\n\n## Summary\r\n\r\nThis PR #196109 was never\r\nback-ported to 8.16.0 !!","sha":"90b14e2ba9449e1550a60c47ccd80e55c4e189fa","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v8.17.0","v8.16.1"],"title":"Remove release notes for missing PR !!","number":199878,"url":"https://github.com/elastic/kibana/pull/199878","mergeCommit":{"message":"Remove release notes for missing PR !! (#199878)\n\n## Summary\r\n\r\nThis PR #196109 was never\r\nback-ported to 8.16.0 !!","sha":"90b14e2ba9449e1550a60c47ccd80e55c4e189fa"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199878","number":199878,"mergeCommit":{"message":"Remove release notes for missing PR !! (#199878)\n\n## Summary\r\n\r\nThis PR #196109 was never\r\nback-ported to 8.16.0 !!","sha":"90b14e2ba9449e1550a60c47ccd80e55c4e189fa"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Shahzad <[email protected]> Co-authored-by: Lisa Cawley <[email protected]>
## Summary This PR elastic#196109 was never back-ported to 8.16.0 !!
## Summary This PR elastic#196109 was never back-ported to 8.16.0 !!
Summary
Fixes #194760 !!
Fixes #169753 !!
Added an options to list monitors from all spaces which user has permission for , user can either select default option which is to get monitors from current space or all permitted spaces !!
Testing
Create monitors in 3 spaces, assign 2 spaces to a role, and create a user. Make sure monitors only appears to which user have space permission.