From a803f570e00faeee6845452306a7693cbacdd84b Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Wed, 18 Nov 2020 17:29:42 -0500 Subject: [PATCH] webaccess: Don't export `checkAccess` Nobody uses it outside of this module. --- src/node/hooks/express/webaccess.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/hooks/express/webaccess.js b/src/node/hooks/express/webaccess.js index 91c58012..18b2f589 100644 --- a/src/node/hooks/express/webaccess.js +++ b/src/node/hooks/express/webaccess.js @@ -48,7 +48,7 @@ exports.userCanModify = (padId, req) => { // Exported so that tests can set this to 0 to avoid unnecessary test slowness. exports.authnFailureDelayMs = 1000; -exports.checkAccess = (req, res, next) => { +const checkAccess = (req, res, next) => { const hookResultMangle = (cb) => { return (err, data) => { if (err != null) httpLogger.error(`Error during access check: ${err}`); @@ -202,6 +202,6 @@ exports.checkAccess = (req, res, next) => { }; exports.expressConfigure = (hookName, args, cb) => { - args.app.use(exports.checkAccess); + args.app.use(checkAccess); return cb(); };