mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
closes #4103
This commit is contained in:
@@ -330,6 +330,31 @@ function createAdmin(callback) {
|
||||
}
|
||||
}
|
||||
|
||||
function createGlobalModeratorsGroup(next) {
|
||||
var groups = require('./groups');
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
groups.exists('Global Moderators', next);
|
||||
},
|
||||
function (exists, next) {
|
||||
if (exists) {
|
||||
winston.info('Global Moderators group found, skipping creation!');
|
||||
return next();
|
||||
}
|
||||
groups.create({
|
||||
name: 'Global Moderators',
|
||||
description: 'Forum wide moderators',
|
||||
hidden: 0,
|
||||
private: 1,
|
||||
disableJoinRequests: 1
|
||||
}, next);
|
||||
},
|
||||
function (groupData, next) {
|
||||
groups.show('Global Moderators', next);
|
||||
}
|
||||
], next);
|
||||
}
|
||||
|
||||
function createCategories(next) {
|
||||
var Categories = require('./categories');
|
||||
|
||||
@@ -476,6 +501,7 @@ install.setup = function (callback) {
|
||||
enableDefaultTheme,
|
||||
createCategories,
|
||||
createAdministrator,
|
||||
createGlobalModeratorsGroup,
|
||||
createMenuItems,
|
||||
createWelcomePost,
|
||||
enableDefaultPlugins,
|
||||
|
||||
Reference in New Issue
Block a user