You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nodebb/src/controllers/globalmods.js

23 lines
495 B
JavaScript

8 years ago
'use strict';
9 years ago
8 years ago
var async = require('async');
9 years ago
var user = require('../user');
var adminBlacklistController = require('./admin/blacklist');
8 years ago
var globalModsController = module.exports;
9 years ago
globalModsController.ipBlacklist = function (req, res, next) {
8 years ago
async.waterfall([
function (next) {
user.isAdminOrGlobalMod(req.uid, next);
},
function (isAdminOrGlobalMod, next) {
if (!isAdminOrGlobalMod) {
return next();
}
adminBlacklistController.get(req, res, next);
},
], next);
9 years ago
};