Skip to content

Commit

Permalink
do not check for privileges if security is disbaled
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Jul 13, 2021
1 parent f441865 commit b72bebf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x-pack/plugins/reporting/server/routes/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export const registerDeprecationsRoutes = (reporting: ReportingCore, logger: Log

const authzWrapper = <P, Q, B>(handler: RequestHandler<P, Q, B>): RequestHandler<P, Q, B> => {
return async (ctx, req, res) => {
const { security } = reporting.getPluginSetupDeps();
if (!security) {
return handler(ctx, req, res);
}

const {
core: { elasticsearch },
} = ctx;
Expand Down

0 comments on commit b72bebf

Please sign in to comment.