|
|
|
@ -113,12 +113,18 @@ Categories.setGroupPrivilege = function(socket, data, callback) {
|
|
|
|
|
Categories.groupsList = function(socket, cid, callback) {
|
|
|
|
|
groups.list({
|
|
|
|
|
expand: false,
|
|
|
|
|
isAdmin: true,
|
|
|
|
|
showSystemGroups: true
|
|
|
|
|
}, function(err, data) {
|
|
|
|
|
if(err) {
|
|
|
|
|
return callback(err);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Remove privilege groups
|
|
|
|
|
data = data.filter(function(groupObj) {
|
|
|
|
|
return groupObj.name.indexOf(':privileges:') === -1;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
async.map(data, function(groupObj, next) {
|
|
|
|
|
privileges.categories.groupPrivileges(cid, groupObj.name, function(err, privileges) {
|
|
|
|
|
if(err) {
|
|
|
|
|