1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

More work on device self-sharing.

This commit is contained in:
Ylian Saint-Hilaire 2021-11-10 13:21:30 -08:00
parent d001699c8c
commit ecd25f3eb2
5 changed files with 35 additions and 23 deletions

View file

@ -403,7 +403,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
else if (event == 'updatefiles') { updateUserFiles(user, ws, domain); }
else {
// If updating guest device shares, if we are updating a user that is not creator of the share, remove the URL.
if (event.action == 'deviceShareUpdate') {
if ((event.action == 'deviceShareUpdate') && (Array.isArray(event.deviceShares))) {
event = common.Clone(event);
for (var i in event.deviceShares) { if (event.deviceShares[i].userid != user._id) { delete event.deviceShares[i].url; } }
}