-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathchanges_to_meteor_core
43 lines (23 loc) · 1.58 KB
/
changes_to_meteor_core
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
We make few changes to Meteor, but we do assume that Meteor works in certain ways.
Changes Meteor-enc makes to Meteor
----------------------------------
0. ./meteor
compile and start crypto-server on server startup
1. mongo/collection.js:
calls to intercept_in & intercept_out
2. ddp/livedata_connection.js
Changed _process_ready:
it calls collection.intercept.on_ready() to decrypt a loaded collection when onReady()
event was triggerd by a subscripton
3. accounts-base & accounts-password
suppressLogin flag &&
intercept code in url_client.js
Assumptions on Meteor that we make
----------------------------------
1. collection.js
It assumes that the functions update, insert, remove can return without actually performing the tasks they are supposed to, as long as these tasks will be performed before calling the subscription ready callback of the user. This assumption appears because we call an _asynchronous_ intercept function inside insert/update/remove before running the code in insert/update/remove.
If Meteor does not patch collection.js in this way, we should check this assumption holds when porting to newer Meteor versions.
2. Our accounts-idp: a large part of this package makes assumptions on the internals of Accounts in Meteor and should be rewritten, for example:
- uses Accounts.callLoginMethod with arguments we supply and we assume these arguments are still valid for Meteor
- verifyEmailMylar must respond in certain ways to Accounts.callLoginMethod
- we are overwriting Accounts.createUser and Accounts.loginWithPassword and we assume a similar API