Skip to content
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

Support multiple features declaring same properties #71106

Merged
merged 6 commits into from
Jul 9, 2020

Conversation

legrego
Copy link
Member

@legrego legrego commented Jul 8, 2020

Summary

When Feature Controls was first introduced, there was an assumption that management, catalogue, and app entries would be owned by a single feature. This is mostly still the case, but Alerting is introducing an Alerts Management screen which is visible when any other alerting-enabled feature is enabled.

The current logic hides management, catalogue, and app entries if a single "owning" feature is disabled. This PR revises this logic so that these entries are only disabled if all "owning" features are disabled.

While alerting's requirements only need this behavior change for management entries, it felt prudent to make catalogue and app entries consistent.

Resolves #71091

cc @gmmorris

@legrego legrego added Feature:Security/Feature Controls Platform Security - Spaces & Role Mgmt feature controls release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.9.0 v8.0.0 labels Jul 8, 2020
if (!acc.has(section[0])) {
acc.set(section[0], []);
}
acc.get(section[0])!.push(...section[1]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: duplicate entries are technically possible here, but it seems tolerable given the lifetime and size of this array

@legrego legrego marked this pull request as ready for review July 8, 2020 17:19
@legrego legrego requested a review from a team as a code owner July 8, 2020 17:19
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@jportner jportner self-assigned this Jul 8, 2020
@jportner
Copy link
Contributor

jportner commented Jul 8, 2020

ACK: will review here shortly.

Copy link
Contributor

@jportner jportner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nit below

…r.test.ts

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
@legrego
Copy link
Member Author

legrego commented Jul 9, 2020

@elasticmachine merge upstream

@legrego
Copy link
Member Author

legrego commented Jul 9, 2020

@elasticmachine merge upstream

@legrego
Copy link
Member Author

legrego commented Jul 9, 2020

@elasticmachine merge upstream

@legrego
Copy link
Member Author

legrego commented Jul 9, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@legrego legrego merged commit a32b9e8 into elastic:master Jul 9, 2020
@legrego legrego deleted the fc/support-multiple-feature-decl branch July 9, 2020 20:50
legrego added a commit to legrego/kibana that referenced this pull request Jul 9, 2020
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
legrego added a commit that referenced this pull request Jul 9, 2020
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jul 10, 2020
…11y-overlay

* 'master' of github.com:elastic/kibana: (33 commits)
  address index templates feedback (elastic#71353)
  Upgrade EUI to v26.3.1 (elastic#70243)
  [build] Creates Linux aarch64 archive (elastic#69165)
  [SIEM][Detection Engine] Fixes skipped tests (elastic#71347)
  [SIEM][Detection Engine][Lists] Adds read_privileges route for lists and list items
  [kbn/optimizer] implement "requiredBundles" property of KP plugins (elastic#70911)
  [Security Solution][Exceptions] - Exceptions modal pt 2 (elastic#70886)
  [ML] DF Analytics:  stop status polling when job stopped (elastic#71159)
  [SIEM][CASE] IBM Resilient Connector (elastic#66385)
  jenkins_xpack_saved_objects_field_metrics.sh expects to be run from the KIBANA_DIR in CI
  Deduplication of entries and items before sending to endpoint (elastic#71297)
  [services/remote/webdriver] fix eslint error (elastic#71346)
  send slack notifications on visual baseline failures
  fix visual regression job (elastic#70999)
  [Ingest Manager] Add schema to usageCollector. (elastic#71219)
  [ftr] use typed chromeOptions object, adding TEST_BROWSER_BINARY_PATH (elastic#71279)
  [Ingest Manager] Fix limited packages incorrect response (elastic#71292)
  Support multiple features declaring same properties (elastic#71106)
  [Security_Solution][Resolver]Add beta badge to Resolver panel (elastic#71183)
  [DOCS] Clarify trial subscription levels (elastic#70636)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Security/Feature Controls Platform Security - Spaces & Role Mgmt feature controls release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Controls should support multiple features declaring management sections
4 participants