fastsurvey / backend

FastSurvey's backend that's crunching the data
1 stars 0 forks source link

Email field not allowed when no authentication is selected #59

Closed dostuffthatmatters closed 3 years ago

dostuffthatmatters commented 3 years ago

With a config with authentication = 'open' an email field cannot be included.

I'd strongly prefer if having an email field without any authentication was allowed.

Right now if I have a finished survey and want to switch from 'email' authentication to 'open' then I cannot do so without removing the email field and adding a text field in the same place.

Do you agree on that?

empicano commented 3 years ago

I don't see anything against it. Let's spin your idea further, what do you think about putting a "verify" checkbox on an email field in the editor (translating to a verify=True/False email field property in the config)? When it's selected we verify the email, otherwise not.

I don't have a good idea for how we could integrate the coming invite authentication into this yet, though.

dostuffthatmatters commented 3 years ago

I really like the verify property on email fields - great idea! For now we can remove the authentication property.

Once we offer invite lists (which would be managed separately anyways) there can be a button "add invite list". The validation only complains if you set both invite and email.verify.

How do you like that?

empicano commented 3 years ago

Sounds good! Concerning validation, I'd then allow an unbounded number of email fields, but at most one email field that's supposed to be verified, no?

dostuffthatmatters commented 3 years ago

To clarify: Yes, the only check is len(email field with verify=true) <= 1.