BUG 10412 Error en home/documents, cuando se pierde sesion en PM SOLVED
- Missing validation when session is expired - Add validation when session is expired
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
<?php
|
||||
if (! isset ($_SESSION ['USER_LOGGED'])) {
|
||||
$res ['success'] = false;
|
||||
$res ['error'] = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$res ['login'] = true;
|
||||
print G::json_encode ($res);
|
||||
die ();
|
||||
}
|
||||
if (! isset ($_REQUEST ['action'])) {
|
||||
$res ['success'] = false;
|
||||
$res ['message'] = 'You may request an action';
|
||||
|
||||
@@ -346,7 +346,12 @@ function openActionDialog( caller, action ) {
|
||||
json = Ext.decode( oResponse.responseText );
|
||||
|
||||
if( json.error && typeof json.error != 'xml' ) {
|
||||
Ext.Msg.alert( "error", json.error );
|
||||
if (typeof(json.login) != 'undefined') {
|
||||
msgbox = Ext.Msg.alert( "error", json.error, function(){try{parent.parent.window.location = '../login/login';} catch(e){}} );
|
||||
} else {
|
||||
msgbox = Ext.Msg.alert( "error", json.error );
|
||||
}
|
||||
msgbox.setIcon( Ext.MessageBox.ERROR );
|
||||
dialog.destroy();
|
||||
return false;
|
||||
}
|
||||
@@ -827,6 +832,14 @@ datastore.on("beforeload",
|
||||
options.params.action = "expandNode";
|
||||
options.params.sendWhat = datastore.sendWhat;
|
||||
});
|
||||
datastore.on("loadexception",
|
||||
function(misc) {
|
||||
try {
|
||||
msgbox = Ext.Msg.alert('error', _('ID_LOGIN_AGAIN'), function(){try{parent.parent.window.location = '../login/login';} catch(e){}} );
|
||||
msgbox.setIcon(Ext.MessageBox.ERROR);
|
||||
} catch(e) {
|
||||
}
|
||||
});
|
||||
// pluggable renders
|
||||
function renderFileName(value, p, record) {
|
||||
return String.format(
|
||||
|
||||
@@ -772,6 +772,7 @@ if (! defined( 'EXECUTE_BY_CRON' )) {
|
||||
$noLoginFiles[] = 'defaultAjaxDynaform';
|
||||
$noLoginFiles[] = 'dynaforms_checkDependentFields';
|
||||
$noLoginFiles[] = 'fields_Ajax';
|
||||
$noLoginFiles[] = 'appFolderAjax';
|
||||
|
||||
$noLoginFolders[] = 'services';
|
||||
$noLoginFolders[] = 'tracker';
|
||||
|
||||
Reference in New Issue
Block a user