summaryrefslogtreecommitdiff
path: root/src/node/hooks/express
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-11-18 14:12:02 +0000
committerJohn McLear <john@mclear.co.uk>2014-11-18 14:12:02 +0000
commitff603d7b586f4a8d675e30d8ff659f5c189afd5a (patch)
tree9fc864d7768a3398e97af71ced82490291f67d4f /src/node/hooks/express
parentd10013c1590594303397476f125354aa945ac483 (diff)
downloadetherpad-lite-ff603d7b586f4a8d675e30d8ff659f5c189afd5a.zip
stability restored now to handle the auth issues
Diffstat (limited to 'src/node/hooks/express')
-rw-r--r--src/node/hooks/express/adminsettings.js4
1 files changed, 3 insertions, 1 deletions
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) {