Skip to content

Commit

Permalink
[ML] Using mlClient callAsInternalUser in job validation (#67609)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic authored May 28, 2020
1 parent 321a10d commit cae6b9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/ml/server/routes/job_validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function jobValidationRoutes({ router, mlLicense }: RouteInitialization,
let errorResp;
const resp = await estimateBucketSpanFactory(
context.ml!.mlClient.callAsCurrentUser,
context.core.elasticsearch.legacy.client.callAsInternalUser,
context.ml!.mlClient.callAsInternalUser,
mlLicense.isSecurityEnabled() === false
)(request.body)
// this catch gets triggered when the estimation code runs without error
Expand Down Expand Up @@ -187,7 +187,7 @@ export function jobValidationRoutes({ router, mlLicense }: RouteInitialization,
context.ml!.mlClient.callAsCurrentUser,
request.body,
version,
context.core.elasticsearch.legacy.client.callAsInternalUser,
context.ml!.mlClient.callAsInternalUser,
mlLicense.isSecurityEnabled() === false
);

Expand Down

0 comments on commit cae6b9e

Please sign in to comment.