diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-05-20 14:23:39 -0400 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-05-20 14:23:39 -0400 |
| commit | 1c93933119a88d4f83f6bebac0e3c4ffc4c130e2 (patch) | |
| tree | 3ed9970427e3f4add4fd5d04420e678a7553e03d /app/auth | |
| parent | bump version (diff) | |
| download | AnnotateChange-1c93933119a88d4f83f6bebac0e3c4ffc4c130e2.tar.gz AnnotateChange-1c93933119a88d4f83f6bebac0e3c4ffc4c130e2.zip | |
Bugfix for registration email restriction
Diffstat (limited to 'app/auth')
| -rw-r--r-- | app/auth/forms.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/auth/forms.py b/app/auth/forms.py index 06bad3f..5bff46f 100644 --- a/app/auth/forms.py +++ b/app/auth/forms.py @@ -42,7 +42,10 @@ class RegistrationForm(FlaskForm): if email.data in current_app.config["USER_EMAILS"]: return if current_app.config["USER_EMAIL_DOMAINS"]: - if not email.data in current_app.config["USER_EMAIL_DOMAINS"]: + if ( + not email.data.split("@")[-1] + in current_app.config["USER_EMAIL_DOMAINS"] + ): raise ValidationError( "Access to AnnotateChange is restricted to " "individuals with email addresses from specific " |
