added a security control at socketiorouter, pad security is now fully enforced

This commit is contained in:
Peter 'Pita' Martischka 2011-08-16 15:53:09 +01:00
parent 317370da2c
commit 3ff34f50d1
3 changed files with 82 additions and 14 deletions

View file

@ -105,17 +105,26 @@
{
changesetLoader.handleSocketResponse(message);
}
else if(message.accessStatus)
{
$("body").html("<h2>You have no permission to access this pad</h2>")
}
});
});
//sends a message over the socket
function sendSocketMsg(type, data)
{
var sessionID = readCookie("sessionID");
var password = readCookie("password");
var msg = { "component" : "timeslider",
"type": type,
"data": data,
"padId": padId,
"token": token,
"sessionID": sessionID,
"password": password,
"protocolVersion": 2};
socket.json.send(msg);