var user = require('./../user.js'), topics = require('./../topics.js'), RDB = require('./../redis.js') categories = require('./../categories.js'); (function(Admin) { Admin.isAdmin = function(req, res, next) { user.isAdministrator((req.user && req.user.uid) ? req.user.uid : 0, function(isAdmin) { if (!isAdmin) res.redirect('/403'); else next(); }); } Admin.create_routes = function(app) { (function() { var routes = ['categories', 'users', 'topics', 'settings', 'themes', 'twitter', 'facebook', 'gplus', 'redis', 'motd']; for (var i=0, ii=routes.length; i