updating checkGlobalPrivacySettings middleware to hook into write-api for auth

This commit is contained in:
Julian Lam
2017-01-12 15:55:46 -05:00
parent 9797f69324
commit 2a9088d571

View File

@@ -15,7 +15,7 @@ module.exports = function (middleware) {
middleware.checkGlobalPrivacySettings = function (req, res, next) {
if (!req.user && !!parseInt(meta.config.privateUserInfo, 10)) {
return controllers.helpers.notAllowed(req, res);
return middleware.authenticate(req, res, next);
}
next();