mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
support for "registered users" and "administrators" in access control (categories). Renamed "Administrators" group to "administrators", and made hidden
This commit is contained in:
@@ -211,11 +211,20 @@ SocketAdmin.categories.setGroupPrivilege = function(socket, data, callback) {
|
||||
};
|
||||
|
||||
SocketAdmin.categories.groupsList = function(socket, cid, callback) {
|
||||
groups.list({expand:false}, function(err, data){
|
||||
async.parallel({
|
||||
groups: function(next) {
|
||||
groups.list({expand:false}, next);
|
||||
},
|
||||
system: function(next) {
|
||||
groups.listSystemGroups({expand: false}, next);
|
||||
}
|
||||
}, function(err, results) {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user