From 5d585a12d65a09dccb40859c6023f243e90f28e0 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Wed, 18 Nov 2020 17:25:56 -0500 Subject: [PATCH] webaccess: Fix some ESLint errors --- src/node/hooks/express/webaccess.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/node/hooks/express/webaccess.js b/src/node/hooks/express/webaccess.js index a1ba47e5..91c58012 100644 --- a/src/node/hooks/express/webaccess.js +++ b/src/node/hooks/express/webaccess.js @@ -1,22 +1,22 @@ -/* global Buffer, exports, require, setTimeout */ +'use strict'; const assert = require('assert').strict; const log4js = require('log4js'); const httpLogger = log4js.getLogger('http'); const settings = require('../../utils/Settings'); -const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks'); +const hooks = require('../../../static/js/pluginfw/hooks'); const readOnlyManager = require('../../db/ReadOnlyManager'); hooks.deprecationNotices.authFailure = 'use the authnFailure and authzFailure hooks instead'; -const staticPathsRE = new RegExp('^/(?:' + [ +const staticPathsRE = new RegExp(`^/(?:${[ 'api/.*', 'favicon\\.ico', 'javascripts/.*', 'locales\\.json', 'pluginfw/.*', 'static/.*', -].join('|') + ')$'); +].join('|')})$`); exports.normalizeAuthzLevel = (level) => { if (!level) return false; @@ -201,7 +201,7 @@ exports.checkAccess = (req, res, next) => { step1PreAuthorize(); }; -exports.expressConfigure = (hook_name, args, cb) => { +exports.expressConfigure = (hookName, args, cb) => { args.app.use(exports.checkAccess); return cb(); };