truncating user list in Groups ACP page, resolved #1132. Refactored system groups handling

This commit is contained in:
Julian Lam
2014-03-19 10:27:02 -04:00
parent 3c5fc72e20
commit 4239c376c8
4 changed files with 45 additions and 49 deletions

View File

@@ -266,20 +266,14 @@ SocketAdmin.categories.setGroupPrivilege = function(socket, data, callback) {
};
SocketAdmin.categories.groupsList = function(socket, cid, callback) {
async.parallel({
groups: function(next) {
groups.list({expand:false}, next);
},
system: function(next) {
groups.listSystemGroups({expand: false}, next);
}
}, function(err, results) {
groups.list({
expand: false,
showSystemGroups: true
}, function(err, data) {
if(err) {
return callback(err);
}
var data = results.groups.concat(results.system);
async.map(data, function(groupObj, next) {
CategoryTools.groupPrivileges(cid, groupObj.gid, function(err, privileges) {
if(err) {