mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 20:41:17 +01:00
fix: #8827, do not require admin:users privilege to ban users
This commit is contained in:
@@ -59,13 +59,11 @@ Users.unfollow = async (req, res) => {
|
||||
};
|
||||
|
||||
Users.ban = async (req, res) => {
|
||||
await hasAdminPrivilege(req.uid, 'users');
|
||||
await api.users.ban(req, { ...req.body, uid: req.params.uid });
|
||||
helpers.formatApiResponse(200, res);
|
||||
};
|
||||
|
||||
Users.unban = async (req, res) => {
|
||||
await hasAdminPrivilege(req.uid, 'users');
|
||||
await api.users.unban(req, { ...req.body, uid: req.params.uid });
|
||||
helpers.formatApiResponse(200, res);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user