mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Add support for logoutOnIdleSessionTimeout (#6773)
This commit is contained in:
parent
0b376fe5a0
commit
9d4f51e970
7 changed files with 32 additions and 5 deletions
|
|
@ -1522,7 +1522,12 @@
|
|||
}
|
||||
|
||||
function setSessionActivity() { sessionActivity = Date.now(); }
|
||||
function checkIdleSessionTimeout() { var delta = (Date.now() - sessionActivity); if (delta > serverinfo.timeout) { window.location.href = 'logout'; } }
|
||||
function checkIdleSessionTimeout() {
|
||||
var delta = (Date.now() - sessionActivity);
|
||||
if (delta > serverinfo.timeout && serverinfo.logoutOnIdleSessionTimeout) {
|
||||
window.location.href = 'logout';
|
||||
}
|
||||
}
|
||||
|
||||
function onMessage(server, message) {
|
||||
switch (message.action) {
|
||||
|
|
|
|||
|
|
@ -2447,7 +2447,9 @@
|
|||
files.Stop();
|
||||
files = null;
|
||||
}
|
||||
window.location.href = 'logout';
|
||||
if (serverinfo.logoutOnIdleSessionTimeout) {
|
||||
window.location.href = 'logout';
|
||||
}
|
||||
} else {
|
||||
var ds = Math.round((serverinfo.timeout - delta) / 1000);
|
||||
if (ds <= 60) {
|
||||
|
|
|
|||
|
|
@ -2897,7 +2897,9 @@
|
|||
files.Stop();
|
||||
files = null;
|
||||
}
|
||||
window.location.href = 'logout';
|
||||
if (serverinfo.logoutOnIdleSessionTimeout) {
|
||||
window.location.href = 'logout';
|
||||
}
|
||||
} else {
|
||||
var ds = Math.round((serverinfo.timeout - delta) / 1000);
|
||||
if (ds <= 60) {
|
||||
|
|
|
|||
|
|
@ -820,7 +820,12 @@
|
|||
}
|
||||
|
||||
function setSessionActivity() { sessionActivity = Date.now(); }
|
||||
function checkIdleSessionTimeout() { var delta = (Date.now() - sessionActivity); if (delta > serverinfo.timeout) { window.location.href = 'logout'; } }
|
||||
function checkIdleSessionTimeout() {
|
||||
var delta = (Date.now() - sessionActivity);
|
||||
if (delta > serverinfo.timeout && serverinfo.logoutOnIdleSessionTimeout) {
|
||||
window.location.href = 'logout';
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Menu System
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue