mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
webaccess: Don't export checkAccess
Nobody uses it outside of this module.
This commit is contained in:
parent
5d585a12d6
commit
a803f570e0
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ exports.userCanModify = (padId, req) => {
|
||||||
// Exported so that tests can set this to 0 to avoid unnecessary test slowness.
|
// Exported so that tests can set this to 0 to avoid unnecessary test slowness.
|
||||||
exports.authnFailureDelayMs = 1000;
|
exports.authnFailureDelayMs = 1000;
|
||||||
|
|
||||||
exports.checkAccess = (req, res, next) => {
|
const checkAccess = (req, res, next) => {
|
||||||
const hookResultMangle = (cb) => {
|
const hookResultMangle = (cb) => {
|
||||||
return (err, data) => {
|
return (err, data) => {
|
||||||
if (err != null) httpLogger.error(`Error during access check: ${err}`);
|
if (err != null) httpLogger.error(`Error during access check: ${err}`);
|
||||||
|
@ -202,6 +202,6 @@ exports.checkAccess = (req, res, next) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.expressConfigure = (hookName, args, cb) => {
|
exports.expressConfigure = (hookName, args, cb) => {
|
||||||
args.app.use(exports.checkAccess);
|
args.app.use(checkAccess);
|
||||||
return cb();
|
return cb();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue