Skip to content

Commit

Permalink
TODO: update authorization in send()
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Feb 17, 2024
1 parent 7542ee7 commit 3f26c76
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,11 @@ class SocketServer extends EventEmitter {
Data = { ...data }
}

// TODO: the following code can cause issues in client and improved approach is to check if user has permission and send or dont send
// if (Data.$filter && Data.$filter.query && Data.$filter.query._id && Data.$filter.query._id.$eq === '$user_id')
// delete Data.$filter.query._id


delete Data.socket
sockets[i].send(JSON.stringify(Data));

Expand Down

0 comments on commit 3f26c76

Please sign in to comment.