mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fix
This commit is contained in:
parent
c6da201af8
commit
bc8aa9bff7
5 changed files with 18 additions and 6 deletions
|
@ -601,8 +601,8 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
}
|
||||
if (typeof domain.userconsentflags == 'number') { serverinfo.consent = domain.userconsentflags; }
|
||||
if ((typeof domain.usersessionidletimeout == 'number') && (domain.usersessionidletimeout > 0)) {serverinfo.timeout = (domain.usersessionidletimeout * 60 * 1000); }
|
||||
if (typeof domain.logoutOnIdleSessionTimeout == 'boolean') {
|
||||
serverinfo.logoutOnIdleSessionTimeout = domain.logoutOnIdleSessionTimeout;
|
||||
if (typeof domain.logoutonidlesessiontimeout == 'boolean') {
|
||||
serverinfo.logoutOnIdleSessionTimeout = domain.logoutonidlesessiontimeout;
|
||||
} else {
|
||||
// Default
|
||||
serverinfo.logoutOnIdleSessionTimeout = true;
|
||||
|
|
|
@ -1524,8 +1524,12 @@
|
|||
function setSessionActivity() { sessionActivity = Date.now(); }
|
||||
function checkIdleSessionTimeout() {
|
||||
var delta = (Date.now() - sessionActivity);
|
||||
if (delta > serverinfo.timeout && serverinfo.logoutOnIdleSessionTimeout) {
|
||||
window.location.href = 'logout';
|
||||
if (delta > serverinfo.timeout) {
|
||||
if (serverinfo.logoutOnIdleSessionTimeout) {
|
||||
window.location.href = 'logout';
|
||||
} else {
|
||||
setSessionActivity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2449,6 +2449,8 @@
|
|||
}
|
||||
if (serverinfo.logoutOnIdleSessionTimeout) {
|
||||
window.location.href = 'logout';
|
||||
} else {
|
||||
setSessionActivity();
|
||||
}
|
||||
} else {
|
||||
var ds = Math.round((serverinfo.timeout - delta) / 1000);
|
||||
|
|
|
@ -2899,6 +2899,8 @@
|
|||
}
|
||||
if (serverinfo.logoutOnIdleSessionTimeout) {
|
||||
window.location.href = 'logout';
|
||||
} else {
|
||||
setSessionActivity();
|
||||
}
|
||||
} else {
|
||||
var ds = Math.round((serverinfo.timeout - delta) / 1000);
|
||||
|
|
|
@ -822,8 +822,12 @@
|
|||
function setSessionActivity() { sessionActivity = Date.now(); }
|
||||
function checkIdleSessionTimeout() {
|
||||
var delta = (Date.now() - sessionActivity);
|
||||
if (delta > serverinfo.timeout && serverinfo.logoutOnIdleSessionTimeout) {
|
||||
window.location.href = 'logout';
|
||||
if (delta > serverinfo.timeout) {
|
||||
if (serverinfo.logoutOnIdleSessionTimeout) {
|
||||
window.location.href = 'logout';
|
||||
} else {
|
||||
setSessionActivity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue