mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-05 14:20:13 +01:00
Merge branch 'webpack5' of https://github.com/NodeBB/NodeBB into webpack5
This commit is contained in:
@@ -120,7 +120,7 @@ privsAdmin.list = async function (uid) {
|
||||
|
||||
// Restrict privileges column to superadmins
|
||||
if (!(await user.isAdministrator(uid))) {
|
||||
const idx = privsAdmin.userPrivilegeList.indexOf('admin:privileges');
|
||||
const idx = Array.from(_privilegeMap.keys()).indexOf('admin:privileges');
|
||||
privilegeLabels.splice(idx, 1);
|
||||
userPrivilegeList.splice(idx, 1);
|
||||
groupPrivilegeList.splice(idx, 1);
|
||||
|
||||
@@ -704,7 +704,8 @@ describe('Post\'s', () => {
|
||||
const cat2 = await categories.create({ name: 'Test Category', description: 'Test category created by testing script' });
|
||||
const result = await apiTopics.create({ uid: globalModUid }, { title: 'target topic', content: 'queued topic', cid: cat2.cid });
|
||||
const modUid = await user.create({ username: 'modofcat1' });
|
||||
await privileges.categories.give(privileges.categories.userPrivilegeList, cat1.cid, modUid);
|
||||
const userPrivilegeList = await privileges.categories.getUserPrivilegeList();
|
||||
await privileges.categories.give(userPrivilegeList, cat1.cid, modUid);
|
||||
let err;
|
||||
try {
|
||||
await apiPosts.move({ uid: modUid }, { pid: replyPid, tid: result.tid });
|
||||
|
||||
Reference in New Issue
Block a user