nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.82k stars 4.01k forks source link

Add health check to make sure emails are not used twice #17146

Open georgehrke opened 5 years ago

georgehrke commented 5 years ago

We should add a health check to make sure emails are not used by multiple users, since that massively !@#$s up calendar scheduling.

Most user backends store that information in oc_preferences. (appid = settings, configkey = email).

We should do a simple database request and make sure emails are unique in there.

Nils160988 commented 5 years ago

I have a few use cases / installations where it is common to have multiple users with the same email:

Usually, there is one administrative account which holds certain shares/calendar for everyone. This account should be independent from regular user accounts. If one person has both a regular user account and takes care of the administrative account, the two accounts will have the same email.

Is this considered bad practice (why?) or can you suggest an alternative setup when you will no longer support same email for multiple accounts?

The other use case would be test instances where I like to create a few test users with the same email (this case is not so important).

georgehrke commented 5 years ago

Is this considered bad practice (why?) or can you suggest an alternative setup when you will no longer support same email for multiple accounts?

We will not prohibit it. We will just show a warning that's it is not supported when using caldav scheduling.

Nils160988 commented 5 years ago

For the test instances, ok, no problem then.

But if I would like to use caldav scheduling as well for my first use case (administrative account and regular account with the same mail address)? Do I have any other options apart from creating an additional mail address?

georgehrke commented 5 years ago

Do I have any other options apart from creating an additional mail address?

No. Scheduling is not supported when email addresses are not unique.

Nils160988 commented 5 years ago

OK, thanks for the information.

It should be noted in the user management part of the documentation that non-unique mail addresses are not (fully) supported. Also it might help if the warning already shows up when trying to create a second user with the same mail address.