mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-08 08:13:55 +02:00
only delete priv groups if they are empty
This commit is contained in:
@@ -240,7 +240,7 @@ module.exports = function(Groups) {
|
||||
if (!groupData) {
|
||||
return callback();
|
||||
}
|
||||
if (parseInt(groupData.hidden, 10) === 1 && parseInt(groupData.memberCount, 10) === 0) {
|
||||
if (Groups.isPrivilegeGroup(groupName) && parseInt(groupData.memberCount, 10) === 0) {
|
||||
Groups.destroy(groupName, next);
|
||||
} else {
|
||||
if (parseInt(groupData.hidden, 10) !== 1) {
|
||||
|
||||
Reference in New Issue
Block a user