From 44398a3ef34959460e3ec2d998d265f1d84f9059 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sat, 11 Mar 2017 01:49:20 -0500 Subject: [PATCH] Update user.dart --- lib/src/services/user.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/src/services/user.dart b/lib/src/services/user.dart index e66170b..a6fec0d 100644 --- a/lib/src/services/user.dart +++ b/lib/src/services/user.dart @@ -23,6 +23,13 @@ configureServer(Db db) { HookedServiceEvent.UPDATED, HookedServiceEvent.REMOVED ], hooks.disable()); + + // Don't broadcast user events over WebSockets - they're sensitive data! + service.beforeAll((e) { + if (e.params == null) + e.params = {'broadcast': false}; + else e.params['broadcast'] = false; + }); // Validate new users, and also hash their passwords. service.beforeCreated