Since we decided to open Human Connection for public registration, we
don't need to create artificial shortage of signups. The original
intention here was too:
1. Grow the network slowly and under control
2. Create an incentive for users to invite their friends
Point 2 is now obsolete, everyone can signup herself. Point 1 is based
on the (seemingly) wrong assumption that there will be a "run" on the
network if we open it for public registration. Our growth was fairly
stable so far.
It might be that people try to register email addresses that they don't own. Then if the actual owner tries to add this email address, she should not get a unique constraint violation. Instead the email will be re-used.
Is this a security issue? Because we re-use the nonce? 🤔
1. Don't expose `termsAndConditionsAgreedAt` as input param, because of ..why?
2. Make the `termsAndConditionsAgreedVersion` a *required* input param
for `SignupVerification`. If new users register, they have to confirm
the terms and conditions. I added another test to check what happens if
the user sends `null`.
3. Sorry @ogerly for confusing you with my review here:
https://github.com/Human-Connection/Human-Connection/pull/1556#pullrequestreview-287516516
What I meant is that we want to simulate a user with no
`termsAndConditionsAgreedVersion`. But of course the `variables` must
have it set when you run the mutations. Now we have the
exclamation mark in the input param, see point 1 ☝️
This commit takes all backend changes for signup and invite feature. I
was working on these features and removed the generated mutations for
type user along the way.