mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
fix: #7494
This commit is contained in:
@@ -93,6 +93,9 @@ module.exports = function (middleware) {
|
||||
};
|
||||
|
||||
middleware.canViewUsers = function canViewUsers(req, res, next) {
|
||||
if (parseInt(res.locals.uid, 10) === req.uid) {
|
||||
return next();
|
||||
}
|
||||
privileges.global.can('view:users', req.uid, function (err, canView) {
|
||||
if (err || canView) {
|
||||
return next(err);
|
||||
|
||||
Reference in New Issue
Block a user