mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
fix name display for oauth (#5980)
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
d2a0946f22
commit
9294488d4e
2 changed files with 13 additions and 0 deletions
|
@ -815,6 +815,14 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
if ((xipkvmport != null) && (xipkvmport.sessions != null)) { docs[i].sessions = xipkvmport.sessions; }
|
||||
}
|
||||
|
||||
// Patch node links with names, like meshes links with names
|
||||
for (var a in docs[i].links) {
|
||||
if (!docs[i].links[a].name) {
|
||||
if (parent.users[a].realname) { docs[i].links[a].name = parent.users[a].realname; }
|
||||
else if (parent.users[a].name) { docs[i].links[a].name = parent.users[a].name; }
|
||||
}
|
||||
}
|
||||
|
||||
r[meshid].push(docs[i]);
|
||||
}
|
||||
const response = { action: 'nodes', responseid: command.responseid, nodes: r, tag: command.tag };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue