closes #1592, closes #1634

This commit is contained in:
barisusakli
2014-06-03 16:10:24 -04:00
parent d7eb89336d
commit b537666e5c
9 changed files with 27 additions and 28 deletions

View File

@@ -25,12 +25,12 @@ var groups = require('../groups'),
settings: {}
};
SocketAdmin.before = function(socket, next) {
SocketAdmin.before = function(socket, method, next) {
user.isAdministrator(socket.uid, function(err, isAdmin) {
if (!err && isAdmin) {
next();
} else {
winston.warn('[socket.io] Call to admin method blocked (accessed by uid ' + socket.uid + ')');
winston.warn('[socket.io] Call to admin method ( ' + method + ' ) blocked (accessed by uid ' + socket.uid + ')');
}
});
};