New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi user support and subscriptions #359

merged 14 commits into from Jun 21, 2017


None yet
1 participant

djaiss commented Jun 20, 2017

This pull request adds support to multi users in one account. It also introduces the notion of subscriptions.

Subscriptions are defined by a new env variable called REQUIRES_SUBSCRIPTION, and defaults to false. As promised, all the paid features on .com will be free if you download and host Monica on your own server.

Basically, as it defaults to false, as shown below in config/monica.php:

'requires_subscription' => env('REQUIRES_SUBSCRIPTION', false),

You don't even to setup the environment variable in your .env on your instance. You won't notice a thing, basically.

Accounts can now have multiple users. To make that happen, I had to change the relationships between User and Account objects. I've tested carefully everything but there might be some errors here and there.

To invite someone to your account, enter the email address of the person you wish to invite. This person will receive an invitation by email. If the person clicks on the invitation link, he will have to create an account on your Monica instance.

Because adding an user to your account can lead to dangerous things, here are two security measures that I've put in place:

  • you will have to explicitly confirm in the User invitation screen that you really want to invite this user.
  • the person who you've invited will have to enter the email address of the person who has invited him before being able to create his account.

I've also added two new statistics server wide:

  • number_of_invitations_sent
  • number_of_accounts_with_more_than_one_user

Statistics are calculated every night.

@djaiss djaiss merged commit 5b5b2da into master Jun 21, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@djaiss djaiss deleted the add-multi-user branch Jun 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment