mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: remove deprecated checkGlobalPrivacySettings
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const nconf = require('nconf');
|
||||
const winston = require('winston');
|
||||
|
||||
const meta = require('../meta');
|
||||
const user = require('../user');
|
||||
@@ -76,11 +75,6 @@ module.exports = function (middleware) {
|
||||
return next();
|
||||
}
|
||||
|
||||
middleware.checkGlobalPrivacySettings = helpers.try(async function checkGlobalPrivacySettings(req, res, next) {
|
||||
winston.warn('[middleware], checkGlobalPrivacySettings deprecated, use canViewUsers or canViewGroups');
|
||||
await middleware.canViewUsers(req, res, next);
|
||||
});
|
||||
|
||||
middleware.canViewUsers = helpers.try(async function canViewUsers(req, res, next) {
|
||||
if (parseInt(res.locals.uid, 10) === req.uid) {
|
||||
return next();
|
||||
|
||||
Reference in New Issue
Block a user