Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,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);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ function executeJobFn(server) {
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);
const uiSettings = server.uiSettingsServiceFactory({
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/reporting/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
export interface KbnServer {
config: () => ConfigObject;
plugins: Record<string, any>;
}

export interface ConfigObject {
Expand Down