on group destroy, remove it from all groups

previously if a group was destroyed it was left behind in privilege
groups
v1.18.x
barisusakli 11 years ago
parent 5c57ed5ea0
commit fde8e9d90f

@ -327,6 +327,16 @@
},
function(next) {
db.delete('group:' + groupName + ':members', next);
},
function(next) {
db.getSetMembers('groups', function(err, groups) {
if (err) {
return next(err);
}
async.each(groups, function(group, next) {
db.setRemove('group:' + group + ':members', groupName, next);
}, next);
});
}
], callback);
};

Loading…
Cancel
Save