diff --git a/lib/routes/routeBackbeat.js b/lib/routes/routeBackbeat.js index 15e53b10c9..e081c46e9b 100644 --- a/lib/routes/routeBackbeat.js +++ b/lib/routes/routeBackbeat.js @@ -1388,7 +1388,7 @@ function routeBackbeat(clientIP, request, response, log) { const path = request.url.replace('/_/backbeat/api', '/_/'); const { host, port } = config.backbeat; const target = `http://${host}:${port}${path}`; - return auth.server.doAuth(request, log, (err, userInfo) => { + return auth.server.doAuth(request, log, (err, userInfo, streamingV4Params, infos) => { if (err) { log.debug('authentication error', { error: err, @@ -1398,6 +1398,8 @@ function routeBackbeat(clientIP, request, response, log) { }); return responseJSONBody(err, null, response, log); } + // eslint-disable-next-line no-param-reassign + request.accountQuotas = infos?.accountQuota; // FIXME for now, any authenticated user can access API // routes. We should introduce admin accounts or accounts // with admin privileges, and restrict access to those