Kick the user if has already successfully authenticated but his session became invalid later

This commit is contained in:
mluto 2013-04-03 11:19:26 +02:00
parent f503f28b08
commit c5b4e4934d
2 changed files with 29 additions and 9 deletions

View file

@ -252,14 +252,22 @@ function handshake()
socket.on('message', function(obj)
{
//the access was not granted, give the user a message
if(!receivedClientVars && obj.accessStatus)
if(obj.accessStatus)
{
$('.passForm').submit(require(module.id).savePassword);
if(!receivedClientVars)
$('.passForm').submit(require(module.id).savePassword);
if(obj.accessStatus == "deny")
{
$('#loading').hide();
$("#permissionDenied").show();
if(receivedClientVars)
{
// got kicked
$("#editorcontainer").hide();
$("#editorloadingbox").show();
}
}
else if(obj.accessStatus == "needPassword")
{