mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 19:11:51 +00:00
user traffic report fix.
This commit is contained in:
parent
72da3a683e
commit
f67f094d88
1 changed files with 2 additions and 8 deletions
10
meshuser.js
10
meshuser.js
|
@ -5541,14 +5541,8 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||||
|
|
||||||
if (command.type == 2) { // This is the user traffic usage report.
|
if (command.type == 2) { // This is the user traffic usage report.
|
||||||
// If we are not user administrator on this site, only search for events with our own user id.
|
// If we are not user administrator on this site, only search for events with our own user id.
|
||||||
var ids = [user._id];
|
var ids = [user._id]; // If we are nto user administrator, only count our own traffic.
|
||||||
if ((user.siteadmin & SITERIGHT_MANAGEUSERS) != 0) {
|
if ((user.siteadmin & SITERIGHT_MANAGEUSERS) != 0) { ids = ['*']; } // If user administrator, count traffic of all users.
|
||||||
if (command.devGroup != null) {
|
|
||||||
ids = [user._id, command.devGroup];
|
|
||||||
} else {
|
|
||||||
if (manageAllDeviceGroups) { ids = ['*']; } else if (user.links) { for (var i in user.links) { ids.push(i); } }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the events in the time range
|
// Get the events in the time range
|
||||||
// MySQL or MariaDB query will ignore the MsgID filter.
|
// MySQL or MariaDB query will ignore the MsgID filter.
|
||||||
|
|
Loading…
Reference in a new issue