mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
fix: #7087, server-side protection against guest blocks
This commit is contained in:
@@ -220,10 +220,6 @@ module.exports = function (SocketUser) {
|
||||
},
|
||||
function (results, next) {
|
||||
isBlocked = results.is;
|
||||
if (!results.can && !isBlocked) {
|
||||
return next(new Error('[[error:cannot-block-privileged]]'));
|
||||
}
|
||||
|
||||
user.blocks[isBlocked ? 'remove' : 'add'](data.blockeeUid, data.blockerUid, next);
|
||||
},
|
||||
], function (err) {
|
||||
|
||||
Reference in New Issue
Block a user