-
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
Use savedObjects
provided by the platform instead of legacy shim.
#53679
Conversation
Pinging @elastic/kibana-security (Team:Security) |
@@ -7,7 +7,7 @@ | |||
import { LegacyAPI } from '../plugin'; | |||
|
|||
export class SecurityAuditLogger { | |||
constructor(private readonly auditLogger: LegacyAPI['auditLogger']) {} | |||
constructor(private readonly getAuditLogger: () => LegacyAPI['auditLogger']) {} |
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: made this to be similar to I've done in ESO plugin and also be able to instantiate this logger (and hence initialize Saved Objects wrappers) outside of registerLegacyAPI
method.
0ca05ef
to
0393fa7
Compare
authz, | ||
legacyAPI: { savedObjects }, | ||
}: SetupSavedObjectsParams) { | ||
export function setupSavedObjects({ auditLogger, authz, savedObjects }: SetupSavedObjectsParams) { | ||
const getKibanaRequest = (request: KibanaRequest | LegacyRequest) => |
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: according to Rudolf we still need to keep this conversion code here as core doesn't do that for us even though typings for setClientFactory
and addClientWrapper
say opposite. It should be fixed soon and we can git rid of this function as well.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
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! It's always nice when we can delete more code than we add 😄
7.x/7.6.0: 78d2362 |
Use
savedObjects
provided by the platform instead of legacy shim in Security plugin.