mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 07:50:37 +01:00
Admin/users (#8762)
* feat: wip admin/users * feat: more work * feat: more fixes * feat: #8662, verified/unverified user groups * feat: add filter * feat: change user search to use filters array * refactor: remove unused search call * fix: tests * fix: cant join system groups * fix: upgrade script
This commit is contained in:
committed by
GitHub
parent
bfaeb27c11
commit
872bacf1c4
@@ -119,13 +119,15 @@ helpers.getGroupPrivileges = async function (cid, groupPrivileges) {
|
||||
|
||||
groupNames = groups.ephemeralGroups.concat(groupNames);
|
||||
moveToFront(groupNames, 'Global Moderators');
|
||||
moveToFront(groupNames, 'unverified-users');
|
||||
moveToFront(groupNames, 'verified-users');
|
||||
moveToFront(groupNames, 'registered-users');
|
||||
|
||||
const adminIndex = groupNames.indexOf('administrators');
|
||||
if (adminIndex !== -1) {
|
||||
groupNames.splice(adminIndex, 1);
|
||||
}
|
||||
const groupData = await groups.getGroupsFields(groupNames, ['private']);
|
||||
const groupData = await groups.getGroupsFields(groupNames, ['private', 'system']);
|
||||
const memberData = groupNames.map(function (member, index) {
|
||||
const memberPrivs = {};
|
||||
|
||||
@@ -137,6 +139,7 @@ helpers.getGroupPrivileges = async function (cid, groupPrivileges) {
|
||||
nameEscaped: translator.escape(validator.escape(member)),
|
||||
privileges: memberPrivs,
|
||||
isPrivate: groupData[index] && !!groupData[index].private,
|
||||
isSystem: groupData[index] && !!groupData[index].system,
|
||||
};
|
||||
});
|
||||
return memberData;
|
||||
|
||||
Reference in New Issue
Block a user