stability restored now to handle the auth issues

pull/2319/head
John McLear 2014-11-18 14:12:02 +00:00
parent d10013c159
commit ff603d7b58
1 changed files with 3 additions and 1 deletions

View File

@ -22,7 +22,9 @@ exports.expressCreateServer = function (hook_name, args, cb) {
exports.socketio = function (hook_name, args, cb) {
var io = args.io.of("/settings");
io.on('connection', function (socket) {
if (!socket.handshake.session.user || !socket.handshake.session.user.is_admin) return;
console.warn ("THIS IS BROKEN");
if (!socket.handshake.session || !socket.handshake.session.user || !socket.handshake.session.user.is_admin) return;
socket.on("load", function (query) {
fs.readFile('settings.json', 'utf8', function (err,data) {