mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 18:56:57 +02:00
fix: #8508, dont allow moving topics if not moderator of target category
This commit is contained in:
@@ -13,6 +13,11 @@ module.exports = function (SocketTopics) {
|
|||||||
throw new Error('[[error:invalid-data]]');
|
throw new Error('[[error:invalid-data]]');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const canMove = await privileges.categories.isAdminOrMod(data.cid, socket.uid);
|
||||||
|
if (!canMove) {
|
||||||
|
throw new Error('[[error:no-privileges]]');
|
||||||
|
}
|
||||||
|
|
||||||
const uids = await user.getUidsFromSet('users:online', 0, -1);
|
const uids = await user.getUidsFromSet('users:online', 0, -1);
|
||||||
|
|
||||||
await async.eachLimit(data.tids, 10, async function (tid) {
|
await async.eachLimit(data.tids, 10, async function (tid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user