mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 06:54:04 +03:00
Added domain urlswitching option.
This commit is contained in:
parent
cae876fd43
commit
c6001dde57
@ -119,6 +119,7 @@
|
|||||||
"_UserSessionIdleTimeout" : 30,
|
"_UserSessionIdleTimeout" : 30,
|
||||||
"__UserConsentFlags__" : "Set to: 1 for desktop, 2 for terminal, 3 for files, 7 for all",
|
"__UserConsentFlags__" : "Set to: 1 for desktop, 2 for terminal, 3 for files, 7 for all",
|
||||||
"_UserConsentFlags" : 7,
|
"_UserConsentFlags" : 7,
|
||||||
|
"_UrlSwitching": false,
|
||||||
"_DesktopPrivacyBarText": "Your privacy bar message",
|
"_DesktopPrivacyBarText": "Your privacy bar message",
|
||||||
"_Limits": {
|
"_Limits": {
|
||||||
"_MaxDevices": 100,
|
"_MaxDevices": 100,
|
||||||
|
@ -5255,7 +5255,7 @@
|
|||||||
|
|
||||||
// Change the URL
|
// Change the URL
|
||||||
var urlviewmode = '';
|
var urlviewmode = '';
|
||||||
if ((xxcurrentView >= 10) && (xxcurrentView <= 19) && (currentNode != null)) {
|
if (((features & 0x10000000) == 0) && (xxcurrentView >= 10) && (xxcurrentView <= 19) && (currentNode != null)) {
|
||||||
urlviewmode = '?viewmode=' + xxcurrentView + '&gotonode=' + currentNode._id.split('/')[2];
|
urlviewmode = '?viewmode=' + xxcurrentView + '&gotonode=' + currentNode._id.split('/')[2];
|
||||||
for (var i in urlargs) { urlviewmode += ('&' + i + '=' + urlargs[i]); }
|
for (var i in urlargs) { urlviewmode += ('&' + i + '=' + urlargs[i]); }
|
||||||
try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { }
|
try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { }
|
||||||
@ -8594,7 +8594,7 @@
|
|||||||
|
|
||||||
// Change the URL
|
// Change the URL
|
||||||
var urlviewmode = '';
|
var urlviewmode = '';
|
||||||
if ((xxcurrentView >= 20) && (xxcurrentView <= 29) && (currentMesh != null)) {
|
if (((features & 0x10000000) == 0) && (xxcurrentView >= 20) && (xxcurrentView <= 29) && (currentMesh != null)) {
|
||||||
urlviewmode = '?viewmode=' + xxcurrentView + '&gotomesh=' + currentMesh._id.split('/')[2];
|
urlviewmode = '?viewmode=' + xxcurrentView + '&gotomesh=' + currentMesh._id.split('/')[2];
|
||||||
for (var i in urlargs) { urlviewmode += ('&' + i + '=' + urlargs[i]); }
|
for (var i in urlargs) { urlviewmode += ('&' + i + '=' + urlargs[i]); }
|
||||||
try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { }
|
try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { }
|
||||||
@ -10562,7 +10562,7 @@
|
|||||||
|
|
||||||
// Change the URL
|
// Change the URL
|
||||||
var urlviewmode = '';
|
var urlviewmode = '';
|
||||||
if ((xxcurrentView >= 51) && (xxcurrentView <= 59) && (currentUserGroup != null)) {
|
if (((features & 0x10000000) == 0) && (xxcurrentView >= 51) && (xxcurrentView <= 59) && (currentUserGroup != null)) {
|
||||||
urlviewmode = '?viewmode=' + xxcurrentView + '&gotougrp=' + currentUserGroup._id.split('/')[2];
|
urlviewmode = '?viewmode=' + xxcurrentView + '&gotougrp=' + currentUserGroup._id.split('/')[2];
|
||||||
for (var i in urlargs) { urlviewmode += ('&' + i + '=' + urlargs[i]); }
|
for (var i in urlargs) { urlviewmode += ('&' + i + '=' + urlargs[i]); }
|
||||||
try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { }
|
try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { }
|
||||||
@ -10836,7 +10836,7 @@
|
|||||||
|
|
||||||
// Change the URL
|
// Change the URL
|
||||||
var urlviewmode = '';
|
var urlviewmode = '';
|
||||||
if ((xxcurrentView >= 30) && (xxcurrentView <= 39) && (currentUser != null)) {
|
if (((features & 0x10000000) == 0) && (xxcurrentView >= 30) && (xxcurrentView <= 39) && (currentUser != null)) {
|
||||||
urlviewmode = '?viewmode=' + xxcurrentView + '&gotouser=' + currentUser._id.split('/')[2];
|
urlviewmode = '?viewmode=' + xxcurrentView + '&gotouser=' + currentUser._id.split('/')[2];
|
||||||
for (var i in urlargs) { urlviewmode += ('&' + i + '=' + urlargs[i]); }
|
for (var i in urlargs) { urlviewmode += ('&' + i + '=' + urlargs[i]); }
|
||||||
try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { }
|
try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { }
|
||||||
@ -11857,7 +11857,7 @@
|
|||||||
if (fullscreen) { deskToggleFull(); }
|
if (fullscreen) { deskToggleFull(); }
|
||||||
|
|
||||||
// Change the URL
|
// Change the URL
|
||||||
if (xxcurrentView > 0) {
|
if (((features & 0x10000000) == 0) && (xxcurrentView > 0)) {
|
||||||
var urlviewmode = '';
|
var urlviewmode = '';
|
||||||
if ((xxcurrentView >= 10) && (xxcurrentView <= 19)) { // Device Link
|
if ((xxcurrentView >= 10) && (xxcurrentView <= 19)) { // Device Link
|
||||||
if (currentNode != null) { urlviewmode = '?viewmode=' + xxcurrentView + '&gotonode=' + currentNode._id.split('/')[2]; }
|
if (currentNode != null) { urlviewmode = '?viewmode=' + xxcurrentView + '&gotonode=' + currentNode._id.split('/')[2]; }
|
||||||
|
@ -1880,6 +1880,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||||||
if (parent.smsserver != null) { features += 0x02000000; } // SMS messaging is supported
|
if (parent.smsserver != null) { features += 0x02000000; } // SMS messaging is supported
|
||||||
if ((parent.smsserver != null) && ((typeof domain.passwordrequirements != 'object') || (domain.passwordrequirements.sms2factor != false))) { features += 0x04000000; } // SMS 2FA is allowed
|
if ((parent.smsserver != null) && ((typeof domain.passwordrequirements != 'object') || (domain.passwordrequirements.sms2factor != false))) { features += 0x04000000; } // SMS 2FA is allowed
|
||||||
if (domain.sessionrecording != null) { features += 0x08000000; } // Server recordings enabled
|
if (domain.sessionrecording != null) { features += 0x08000000; } // Server recordings enabled
|
||||||
|
if (domain.urlswitching === false) { features += 0x10000000; } // Disables the URL switching feature
|
||||||
|
|
||||||
// Create a authentication cookie
|
// Create a authentication cookie
|
||||||
const authCookie = obj.parent.encodeCookie({ userid: user._id, domainid: domain.id, ip: cleanRemoteAddr(req.ip) }, obj.parent.loginCookieEncryptionKey);
|
const authCookie = obj.parent.encodeCookie({ userid: user._id, domainid: domain.id, ip: cleanRemoteAddr(req.ip) }, obj.parent.loginCookieEncryptionKey);
|
||||||
|
Loading…
Reference in New Issue
Block a user