mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
parent
48c2928965
commit
1ced518ccb
3 changed files with 11 additions and 0 deletions
|
@ -25,6 +25,11 @@ export const getCustomLogo = async ({
|
|||
getBasePath: () => job.basePath || serverBasePath,
|
||||
};
|
||||
|
||||
if (server.plugins.security) {
|
||||
const { authorization } = server.plugins.security;
|
||||
await authorization.mode.initialize(fakeRequest);
|
||||
}
|
||||
|
||||
const savedObjects = server.savedObjects;
|
||||
|
||||
const savedObjectsClient = savedObjects.getScopedSavedObjectsClient(fakeRequest);
|
||||
|
|
|
@ -48,6 +48,11 @@ function executeJobFn(server) {
|
|||
getBasePath: () => basePath || serverBasePath,
|
||||
};
|
||||
|
||||
if (server.plugins.security) {
|
||||
const { authorization } = server.plugins.security;
|
||||
await authorization.mode.initialize(fakeRequest);
|
||||
}
|
||||
|
||||
const callEndpoint = (endpoint, clientParams = {}, options = {}) => {
|
||||
return callWithRequest(fakeRequest, endpoint, clientParams, options);
|
||||
};
|
||||
|
|
1
x-pack/plugins/reporting/types.d.ts
vendored
1
x-pack/plugins/reporting/types.d.ts
vendored
|
@ -14,6 +14,7 @@ type SavedObjectClient = any;
|
|||
export interface KbnServer {
|
||||
info: { protocol: string };
|
||||
config: () => ConfigObject;
|
||||
plugins: Record<string, any>;
|
||||
savedObjects: {
|
||||
getScopedSavedObjectsClient: (
|
||||
fakeRequest: { headers: object; getBasePath: () => string }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue