|
|
@ -16,7 +16,7 @@ var app,
|
|
|
|
|
|
|
|
|
|
|
|
middleware.isAdmin = function(req, res, next) {
|
|
|
|
middleware.isAdmin = function(req, res, next) {
|
|
|
|
if (!req.user) {
|
|
|
|
if (!req.user) {
|
|
|
|
return res.redirect('/login?next=admin');
|
|
|
|
return res.redirect(nconf.get('relative_path') + '/login?next=admin');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
user.isAdministrator((req.user && req.user.uid) ? req.user.uid : 0, function (err, isAdmin) {
|
|
|
|
user.isAdministrator((req.user && req.user.uid) ? req.user.uid : 0, function (err, isAdmin) {
|
|
|
|