mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-27 15:45:53 -05:00
Fixed access control check when managing all device groups.
This commit is contained in:
parent
da5b501192
commit
30f727c32e
@ -4105,7 +4105,7 @@
|
||||
if ((mesh == null) || (mesh.links == null)) { return 0; }
|
||||
|
||||
// Check if super user
|
||||
if (userinfo.manageAllDeviceGroups) return 0xFFFFFFFF;
|
||||
if (userinfo.manageAllDeviceGroups && (userid == userinfo._id)) return 0xFFFFFFFF;
|
||||
|
||||
// Check device group link permission
|
||||
var rights = 0, r = mesh.links[userid];
|
||||
@ -4141,7 +4141,7 @@
|
||||
if (mesh.links[userid] != null) { return true; } // User has visilibity thru a direct link
|
||||
|
||||
// Check if user user
|
||||
if (userinfo.manageAllDeviceGroups) return true;
|
||||
if (userinfo.manageAllDeviceGroups && (userid == userinfo._id)) return true;
|
||||
|
||||
// Check permissions thru user groups
|
||||
var user = null;
|
||||
|
@ -12831,7 +12831,7 @@
|
||||
if ((mesh == null) || (mesh.links == null)) { return 0; }
|
||||
|
||||
// Check if super user
|
||||
if (serverinfo.manageAllDeviceGroups) return 0xFFFFFFFF;
|
||||
if (serverinfo.manageAllDeviceGroups && (userid == userinfo._id)) return 0xFFFFFFFF;
|
||||
|
||||
// Check device group link permission
|
||||
var rights = 0, r = mesh.links[userid];
|
||||
@ -12867,7 +12867,7 @@
|
||||
if (mesh.links[userid] != null) { return true; } // User has visilibity thru a direct link
|
||||
|
||||
// Check if user user
|
||||
if (serverinfo.manageAllDeviceGroups) return true;
|
||||
if (serverinfo.manageAllDeviceGroups && (userid == userinfo._id)) return true;
|
||||
|
||||
// Check permissions thru user groups
|
||||
var user = null;
|
||||
|
Loading…
Reference in New Issue
Block a user