mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added relay right and fixed relay permissions (#4682)
This commit is contained in:
parent
390ddd9fd6
commit
e74a308113
6 changed files with 75 additions and 59 deletions
|
@ -252,8 +252,8 @@ module.exports.CreateWebRelayServer = function (parent, db, args, certificates,
|
|||
|
||||
// Check that the user has rights to access this device
|
||||
parent.webserver.GetNodeWithRights(domain, userid, nodeid, function (node, rights, visible) {
|
||||
// If there is no remote control rights, reject this web relay
|
||||
if ((rights & 8) == 0) { res.sendStatus(404); return; }
|
||||
// If there is no remote control or relay rights, reject this web relay
|
||||
if ((rights & 0x00200008) == 0) { res.sendStatus(404); return; } // MESHRIGHT_REMOTECONTROL or MESHRIGHT_RELAY
|
||||
|
||||
// There is a relay session, but it's not correct, close it.
|
||||
if (xrelaySession != null) { xrelaySession.close(); delete relaySessions[webSessionId]; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue