feat: banned-users group

This commit is contained in:
gasoved
2020-12-14 09:20:41 +03:00
committed by Julian Lam
parent 389690c3fa
commit 53e0d4d2e0
24 changed files with 350 additions and 114 deletions

View File

@@ -41,7 +41,7 @@ groupsController.get = async function (req, res, next) {
categories.buildForSelectAll(),
]);
if (!group) {
if (!group || groupName === groups.BANNED_USERS) {
return next();
}
group.isOwner = true;
@@ -69,6 +69,7 @@ async function getGroupNames() {
return groupNames.filter(name => name !== 'registered-users' &&
name !== 'verified-users' &&
name !== 'unverified-users' &&
name !== groups.BANNED_USERS &&
!groups.isPrivilegeGroup(name)
);
}