-
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] Disable selecting standalone instructions for user without agent policies READ permissions #187517
[Fleet] Disable selecting standalone instructions for user without agent policies READ permissions #187517
Conversation
…ent policies READ permissions
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@@ -144,8 +144,7 @@ export const calculateAuthz = ({ | |||
// These are currently used by Fleet Server setup | |||
setup: fleet.all || fleet.setup, | |||
readEnrollmentTokens: (fleet.all || fleet.setup || fleet.agents?.all) ?? false, | |||
readAgentPolicies: | |||
(fleet.all || fleet.read || fleet.setup || fleet.agentPolicies?.read) ?? false, | |||
readAgentPolicies: (fleet.all || fleet.setup) ?? false, |
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.
why is fleet.agentPolicies?.read
removed here?
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.
This is the case where the feature flag subfeatureEnabled
is not enabled, we should not check for subfeature privileges in that case
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.
ah I missed that, thanks
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
cc @nchaulet |
…ent policies READ permissions (elastic#187517) (cherry picked from commit c27ca40)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…hout agent policies READ permissions (#187517) (#187605) # Backport This will backport the following commits from `main` to `8.15`: - [[Fleet] Disable selecting standalone instructions for user without agent policies READ permissions (#187517)](#187517) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nicolas Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-04T13:45:20Z","message":"[Fleet] Disable selecting standalone instructions for user without agent policies READ permissions (#187517)","sha":"c27ca409a4fcfa4a16e44558ab1302fa26f7f3b8","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v8.15.0","v8.16.0"],"title":"[Fleet] Disable selecting standalone instructions for user without agent policies READ permissions","number":187517,"url":"https://github.com/elastic/kibana/pull/187517","mergeCommit":{"message":"[Fleet] Disable selecting standalone instructions for user without agent policies READ permissions (#187517)","sha":"c27ca409a4fcfa4a16e44558ab1302fa26f7f3b8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187517","number":187517,"mergeCommit":{"message":"[Fleet] Disable selecting standalone instructions for user without agent policies READ permissions (#187517)","sha":"c27ca409a4fcfa4a16e44558ab1302fa26f7f3b8"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nicolas Chaulet <[email protected]>
Description
Resolve #184567
User without agent policies read cannot access the full agent policy, so cannot display the add standalone agent, that PR disable the switch (or tab) to display the add standalone agent instructions
UI changes