mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-13 12:58:17 +03:00
bug #2037: Check if session cookie has been changed
This commit is contained in:
parent
4b964caa56
commit
bab6ea3092
@ -483,6 +483,7 @@ var OpenNebula = {
|
|||||||
url: "logout",
|
url: "logout",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
success: function(response){
|
success: function(response){
|
||||||
|
$.cookie("one-user", null);
|
||||||
return callback ? callback(request, response) : null;
|
return callback ? callback(request, response) : null;
|
||||||
},
|
},
|
||||||
error: function(response){
|
error: function(response){
|
||||||
|
@ -14,6 +14,18 @@
|
|||||||
/* limitations under the License. */
|
/* limitations under the License. */
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
var user_cookie = $.cookie("one-user");
|
||||||
|
|
||||||
|
setInterval(function(){
|
||||||
|
var new_cookie = $.cookie("one-user");
|
||||||
|
|
||||||
|
if ((new_cookie == null) || (new_cookie !== user_cookie)) {
|
||||||
|
window.location.href='/';
|
||||||
|
} else {
|
||||||
|
user_cookie = new_cookie
|
||||||
|
}
|
||||||
|
},5000);
|
||||||
|
|
||||||
|
|
||||||
Config = {
|
Config = {
|
||||||
"isTabEnabled": function(tab_name){
|
"isTabEnabled": function(tab_name){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user