-
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
[Cases Plugin] Migrate authc.getCurrentUser usage to coreStart.security #187190
[Cases Plugin] Migrate authc.getCurrentUser usage to coreStart.security #187190
Conversation
lookupRealm: { name: '', type: '' }, | ||
authenticationProvider: '', | ||
}); | ||
const response = await securityService.authc.getCurrentUser(); |
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.
Removed the else
as it would have been dead code. The new security service comes from Core and is always available.
@@ -65,6 +65,7 @@ export const App: React.FC<{ deps: RenderAppProps }> = ({ deps }) => { | |||
kibanaVersion, | |||
...coreStart, | |||
...pluginsStart, | |||
securityService: coreStart.security, |
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.
Note, KibanaContextProvider
isn't well typed for custom service objects like this. See the FIXME in x-pack/plugins/cases/public/common/lib/kibana/kibana_react.ts
/ci |
💔 Build FailedFailed CI StepsTest Failures
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Part of #186574
Summary
This PR migrates the method to access a Cases Plugin view model field, which consumes
authc.getCurrentUser
, to usecoreStart.security
.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.
Checklist
Delete any items that are not applicable to this PR.