Skip to content

Commit

Permalink
Suport callWithInternalUser
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisronline committed Feb 7, 2020
1 parent f03b070 commit d3983b2
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ export function registerMonitoringCollection(
const legacyCluster: Cluster = {
callWithRequest: async (req: any, endpoint: string, params: any) =>
cluster.asScoped(req).callAsCurrentUser(endpoint, params),
callWithInternalUser: () => {
throw new Error(
'callWithInternalUser is not supported in this context. Please use `callWithRequest`'
);
},
callWithInternalUser: (endpoint: string, params: any) =>
cluster.callAsInternalUser(endpoint, params),
};
telemetryCollectionManager.setCollection({
esCluster: legacyCluster,
Expand Down

0 comments on commit d3983b2

Please sign in to comment.