-
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
Feature Controls: addressing bugs for enterprise search #70538
Conversation
Pinging @elastic/kibana-security (Team:Security) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
👋 Just to check - this PR doesn't yet remove EDIT: Oh wait, I think I misunderstood my type errors - it's |
Correct this does not remove |
ACK: will review first thing Monday morning. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@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.
LGTM!
@@ -19,7 +19,7 @@ export function disableUICapabilitiesFactory( | |||
authz: AuthorizationServiceSetup | |||
) { | |||
const featureNavLinkIds = features | |||
.map((feature) => feature.navLinkId) | |||
.flatMap((feature) => [feature.navLinkId, ...feature.app]) |
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: would you mind adding a comment here that explains why we use nav link IDs and app IDs? I took a look at the code before I read PR description I got confused a bit app IDs being a part of featureNavLinkIds
🙂
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
#70808) Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Fixes two issues related to feature visibility, which only surfaced when Enterprise Search attempted to integrate with Feature Controls in unique ways that haven't been used up until now:
Resolves Features without privileges should not appear in role management #70501
Features without privileges should not appear in the role management screen. This fixes that behavior.
Updates the way we toggle visible applications for Spaces and Security by also inspecting the
app
array that each feature specifies. App nav links in the Kibana Platform have an id which matches the application itself, so we really should have been doing this for a while now. We got a way without this fix because Features also required a distinctnavLinkId
, which happened to correspond to the application id. Note that thisnavLinkId
was required for the legacy platform world...it wasn't always broken.This is also required for the security solution as well, who has a similar bug to work through: #69798
cc @XavierM