webaccess: Fix some ESLint errors
This commit is contained in:
parent
4587c0fb4d
commit
5d585a12d6
1 changed files with 5 additions and 5 deletions
|
@ -1,22 +1,22 @@
|
||||||
/* global Buffer, exports, require, setTimeout */
|
'use strict';
|
||||||
|
|
||||||
const assert = require('assert').strict;
|
const assert = require('assert').strict;
|
||||||
const log4js = require('log4js');
|
const log4js = require('log4js');
|
||||||
const httpLogger = log4js.getLogger('http');
|
const httpLogger = log4js.getLogger('http');
|
||||||
const settings = require('../../utils/Settings');
|
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');
|
const readOnlyManager = require('../../db/ReadOnlyManager');
|
||||||
|
|
||||||
hooks.deprecationNotices.authFailure = 'use the authnFailure and authzFailure hooks instead';
|
hooks.deprecationNotices.authFailure = 'use the authnFailure and authzFailure hooks instead';
|
||||||
|
|
||||||
const staticPathsRE = new RegExp('^/(?:' + [
|
const staticPathsRE = new RegExp(`^/(?:${[
|
||||||
'api/.*',
|
'api/.*',
|
||||||
'favicon\\.ico',
|
'favicon\\.ico',
|
||||||
'javascripts/.*',
|
'javascripts/.*',
|
||||||
'locales\\.json',
|
'locales\\.json',
|
||||||
'pluginfw/.*',
|
'pluginfw/.*',
|
||||||
'static/.*',
|
'static/.*',
|
||||||
].join('|') + ')$');
|
].join('|')})$`);
|
||||||
|
|
||||||
exports.normalizeAuthzLevel = (level) => {
|
exports.normalizeAuthzLevel = (level) => {
|
||||||
if (!level) return false;
|
if (!level) return false;
|
||||||
|
@ -201,7 +201,7 @@ exports.checkAccess = (req, res, next) => {
|
||||||
step1PreAuthorize();
|
step1PreAuthorize();
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.expressConfigure = (hook_name, args, cb) => {
|
exports.expressConfigure = (hookName, args, cb) => {
|
||||||
args.app.use(exports.checkAccess);
|
args.app.use(exports.checkAccess);
|
||||||
return cb();
|
return cb();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue