Only invited user can register in strict mode,
Set mail server in admin panel,
Switch strict mode in admin panel,
Invite people to system in admin panel
This one is a pretty strange chain of events:
* fetching /.sandstorm-login via accounts-sandstorm's rendezvous protocol
causes a user to be created in the users collection
* models/users.js has hooks to create a board and lists when a user is created
* models/activities.js has a hook to create activity entries when a list is
created
* this hook does not handle not having no boardId, which results in attempting
to run the hook with boardId: 'false'. 'false' does not have a title
attribute, which causes the whole method call to throw an exception.
* This makes the initial login fail.
While there may be other bugs, the simple fix is to not create the board and
lists when running under Sandstorm, where you only have one board anyway.
The member is only set to inactive, so we could not test for $pull.
Instead we have to look into the $set modified and check whether the
member was deactivated.
We cannot rely on the automatic userId setting of the collection hooks.
If a user is created during invitation, the userId field will contain
the id of the inviting user.
This fix this, by mocking the CollectionHooks.getUserId function and
returning the userId of the new user for all new documents after
creating the user.
The duplicated logic was nessessary because the before.insert hook was
not called before validation, when inserting was initiated on the server.
Using autoValues fixed this problem.
The before.insert hooks have the problem, that they are executed in a
different order if called from the client or from the server. If called
from the client, the before.insert hook is called before validation of
the schema, but if called from the server, the validation is called
first and fails.
This commit also removes the “import a single Trello card” as we couldn’t figure
out some reasonable use case.
We also create a new publication on the server to provide the minimal user
profile informations required to display an avatar.