-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DataViews] Use client-side authc.getCurrentUser from core.security (#…
…186856) ## Summary Part of #186574 Background: This PR serves as an example of a plugin migrating away from depending on the Security plugin, which is a high priority effort for the last release before 9.0. The Data Views plugin uses the `authc.getCurrentUser` method as a means to use the user's profile_uid for creating a user-hash which is sent as a field in the headers of a particular request. What makes this example interesting: Data Views was not able to have a direct dependency on the Security plugin due to issues with a circular dependency. As a workaround, it used the `coreSetup.plugins.onStart` Promise to use Security services in a non-contractual way. The change in this PR does away with the workaround and allows Data Views to consume the Security service in a more typical way. ### Checklist Delete any items that are not applicable to this PR. - [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 --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Lukas Olson <[email protected]>
- Loading branch information
1 parent
66f36af
commit 1224a05
Showing
4 changed files
with
4 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters