This commit is contained in:
barisusakli
2016-01-25 13:36:10 +02:00
parent 32466d8bb1
commit 86d70eca74
12 changed files with 222 additions and 97 deletions

View File

@@ -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,