From ff603d7b586f4a8d675e30d8ff659f5c189afd5a Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 18 Nov 2014 14:12:02 +0000 Subject: stability restored now to handle the auth issues --- src/node/hooks/express/adminsettings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/node/hooks/express') diff --git a/src/node/hooks/express/adminsettings.js b/src/node/hooks/express/adminsettings.js index 2a48d289..ba3009cd 100644 --- a/src/node/hooks/express/adminsettings.js +++ b/src/node/hooks/express/adminsettings.js @@ -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) { -- cgit v1.2.3